Skip to content

Commit 38c9c0f

Browse files
This machineThis machine
This machine
authored and
This machine
committedFeb 14, 2020
First major commit of example project
0 parents  commit 38c9c0f

17 files changed

+1616
-0
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
.DS_Store

‎config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
this is all for quick prototyping purposes. In an ideal scenario
3+
some of these configurations would be env variables or there would
4+
be multiple config files for dev vs prod
5+
*/
6+
7+
exports.dbConnection = {
8+
host: 'localhost',
9+
port: 5432,
10+
database: 'express_db_example',
11+
username: 'kevinhunt',
12+
};
13+
14+
exports.secret = 'This is a secret';

‎express.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const express = require('express');
2+
const app = express();
3+
const cookieParser = require('cookie-parser');
4+
const port = 3000;
5+
const routes = require('./routes');
6+
7+
8+
app.set('view engine', 'pug');
9+
app.use(express.json());
10+
app.use(express.urlencoded({ extended: true}));
11+
app.use(cookieParser());
12+
13+
app.use(express.static('public'));
14+
15+
app.use(routes);
16+
17+
18+
app.listen(port, () => console.log(`User group app listening on port ${port}!`));

0 commit comments

Comments
 (0)
Please sign in to comment.