Skip to content

Commit a48ca7d

Browse files
committed
Agrego app.js para arrancar el servidor
1 parent 9786b0f commit a48ca7d

File tree

5 files changed

+99
-3
lines changed

5 files changed

+99
-3
lines changed

.bowerrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "app/bower_components"
3+
}

.gitignore

+62-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,65 @@
44
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
55

66
# User-specific stuff:
7-
.idea
7+
.idea
8+
### Node template
9+
# Logs
10+
logs
11+
*.log
12+
npm-debug.log*
13+
yarn-debug.log*
14+
yarn-error.log*
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
28+
# nyc test coverage
29+
.nyc_output
30+
31+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
32+
.grunt
33+
34+
# Bower dependency directory (https://bower.io/)
35+
bower_components
36+
37+
# node-waf configuration
38+
.lock-wscript
39+
40+
# Compiled binary addons (http://nodejs.org/api/addons.html)
41+
build/Release
42+
43+
# Dependency directories
44+
node_modules/
45+
jspm_packages/
46+
47+
# Typescript v1 declaration files
48+
typings/
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional REPL history
57+
.node_repl_history
58+
59+
# Output of 'npm pack'
60+
*.tgz
61+
62+
# Yarn Integrity file
63+
.yarn-integrity
64+
65+
# dotenv environment variables file
66+
.env
67+
68+

app/app.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var express = require('express');
2+
var app = express();
3+
4+
var path = __dirname;
5+
var port = process.env.PORT || 8080;
6+
7+
app.use(express.static(path));
8+
app.get('*', function(req, res) {
9+
res.sendFile(path + '/index.html');
10+
});
11+
12+
app.listen(port, function(){
13+
console.log('Listening ' + port);
14+
});

app/index.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Game Dev Selector</title>
6+
</head>
7+
<body>
8+
Game Dev Selector
9+
</body>
10+
</html>

package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"description": "Selecciona las mejores combinaciones para Game Dev Tycoon",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"postinstall": "bower install",
8+
"update-deps": "npm update",
9+
"postupdate-deps": "bower update",
10+
"prestart": "npm install",
11+
"start": "node ./app/app.js"
812
},
913
"repository": {
1014
"type": "git",
@@ -20,5 +24,9 @@
2024
"bugs": {
2125
"url": "https://github.com/SRJ9/game-dev-selector/issues"
2226
},
23-
"homepage": "https://github.com/SRJ9/game-dev-selector#readme"
27+
"homepage": "https://github.com/SRJ9/game-dev-selector#readme",
28+
"dependencies": {
29+
"bower": "^1.8.0",
30+
"express": "^4.15.3"
31+
}
2432
}

0 commit comments

Comments
 (0)