-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1fbf86e
Showing
10 changed files
with
637 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PORT=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CurrentProjectSetting": null | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const express = require('express'); | ||
const path = require('path'); | ||
require('dotenv').config(); | ||
|
||
//App de Express | ||
const app = express(); | ||
|
||
//Node server | ||
const server = require('http').createServer(app); | ||
module.exports.io = require('socket.io')(server); | ||
require('./sockets/socket'); | ||
|
||
|
||
//Path publico | ||
const publicPath = path.resolve(__dirname, 'public'); | ||
app.use(express.static(publicPath)); | ||
|
||
|
||
|
||
|
||
server.listen(process.env.PORT, (err) => { | ||
|
||
if (err) throw new Error(err); | ||
|
||
console.log('Servidor corriendo en el puerto', process.env.PORT); | ||
|
||
}); |
Oops, something went wrong.