Added the basic structure and fixed some issues!
Added the basic structure and fixed some issues! Fixes #2, fixes # 3
This commit is contained in:
parent
4427226eef
commit
1bcc272e0b
22 changed files with 4022 additions and 247 deletions
server
21
server/index.js
Normal file
21
server/index.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import bodyParser from 'koa-bodyparser';
|
||||
import Koa from 'koa';
|
||||
import logger from 'koa-logger';
|
||||
import helmet from 'koa-helmet';
|
||||
import routing from './routes/';
|
||||
import { port } from './config';
|
||||
|
||||
// Create Koa Application
|
||||
const app = new Koa();
|
||||
|
||||
app
|
||||
.use(logger())
|
||||
.use(bodyParser())
|
||||
.use(helmet());
|
||||
|
||||
routing(app);
|
||||
|
||||
// Start the application
|
||||
app.listen(port, () => console.log(`✅ The server is running at http://localhost:${port}/`));
|
||||
|
||||
export default app;
|
Loading…
Add table
Add a link
Reference in a new issue