Initial commit.

This commit is contained in:
Ahmed Bouhuolia
2019-08-20 00:32:41 +02:00
commit cb8c294d74
61 changed files with 20779 additions and 0 deletions

1
server/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/node_modules/

1930
server/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

22
server/package.json Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "moosher-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"bookshelf": "^0.15.1",
"bookshelf-json-columns": "^2.1.1",
"bookshelf-modelbase": "^2.10.4",
"dotenv": "^8.1.0",
"errorhandler": "^1.5.1",
"express": "^4.17.1",
"express-oauth-server": "^2.0.0",
"knex": "^0.19.2",
"mysql2": "^1.6.5"
}
}

21
server/server.js Normal file
View File

@@ -0,0 +1,21 @@
import path from 'path';
import dotenv from 'dotenv';
import errorHandler from 'errorhandler';
import app from './http/app';
dotenv.config({
path: path.join(__dirname, '.env')
});
app.use(errorHandler);
const server = app.listen(app.get('port'), () => {
console.log(
" App is running at http://localhost:%d in %s mode",
app.get("port"),
app.get("env")
);
console.log(" Press CTRL-C to stop\n");
});
export default server;