-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
24 lines (22 loc) · 754 Bytes
/
app.js
File metadata and controls
24 lines (22 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';
const express = require('express');
const bodyParser = require('body-parser');
const multer = require('multer');
const upload = multer({ dest: 'tmp/' });
const app = express();
const saveGamePro = require('./');
saveGamePro.config.secretKey = 'MyCustomSecretKey';
saveGamePro.config.database.host = 'localhost';
saveGamePro.config.database.user = 'root';
saveGamePro.config.database.password = '';
saveGamePro.config.database.name = 'savegamepro';
saveGamePro.config.uploadFolder = "./uploads/";
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(upload.single('file'));
app.post('/savegamepro', saveGamePro);
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});