-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.js
More file actions
30 lines (24 loc) · 671 Bytes
/
Copy pathserver.js
File metadata and controls
30 lines (24 loc) · 671 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
25
26
27
28
29
30
import express from 'express';
import controllerRouting from './routes/index';
/**
* This project is a summary of back-end concepts:
* authentication, NodeJS, MongoDB, Redis,
* pagination and background processing.
*
* The objective was to build a simple platform to upload and view files:
*
* User authentication via a token
* List all files
* Upload a new file
* Change permission of a file
* View a file
* Generate thumbnails for images
*/
const app = express();
const port = process.env.PORT || 5000;
app.use(express.json());
controllerRouting(app);
app.listen(port, () => {
console.log(`Server running on port ${port}`);
});
export default app;