Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80537 views
1
require('../shared/init');
2
3
import koa from 'koa';
4
const app = koa();
5
export default app;
6
7
// Serve static assets from `public` directory
8
import serve from 'koa-static';
9
app.use(serve('public'));
10
11
import appView from './appView';
12
appView(app);
13
14
// Start listening
15
const port = process.env.PORT || 3000;
16
app.listen(port);
17
console.log(`App started listening on port ${port}`);
18
19