Skip to content

Commit 95ab6fc

Browse files
author
john
committed
[f] First time with serializer
0 parents  commit 95ab6fc

File tree

15 files changed

+4072
-0
lines changed

15 files changed

+4072
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server/config
2+
node_modules/

.sequelizerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
"config": path.resolve('./server/config', 'config.json'),
5+
"models-path": path.resolve('./server/models'),
6+
"seeders-path": path.resolve('./server/seeders'),
7+
"migrations-path": path.resolve('./server/migrations')
8+
};

app.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const express = require('express');
2+
const logger = require('morgan');
3+
const bodyParser = require('body-parser');
4+
5+
const app = express();
6+
app.use(logger('dev'));
7+
app.use(bodyParser.json());
8+
app.use(bodyParser.urlencoded({ extended: false }));
9+
10+
require('./server/routes')(app);
11+
app.get('*', (req, res) =>
12+
res.status(200).send({
13+
message: 'Welcome to the beginning of nothingness.'
14+
})
15+
);
16+
17+
module.exports = app;

bin/www.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This will be our application entry. We'll setup our server here.
2+
const http = require('http');
3+
const app = require('../app'); // The express app we just created
4+
5+
const port = parseInt(process.env.PORT, 10) || 8000;
6+
app.set('port', port);
7+
8+
const server = http.createServer(app);
9+
server.listen(port);

0 commit comments

Comments
 (0)