Skip to content
Permalink
af1c00671d
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
25 lines (19 sloc) 556 Bytes
const Koa = require('koa');
const cors = require('@koa/cors');
const app = new Koa();
app.use(cors());
/*
* Define route handler(s):
*
* This means we connect HTTP methods: GET, POST, ...
* and URI paths: /some/uri/path
* to JavaScript functions that handle the request.
*
* Once defined we then add them to the app object.
*/
const users = require('./routes/users.js');
const applications = require('./routes/applications.js');
app.use(users.routes());
app.use(applications.routes());
let port = process.env.PORT || 3000;
app.listen(port);