Skip to content
Permalink
master
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
/**
* @file 304CEM Writers Collective OpenAPI Docs Server
* @author Bethany Hill
* @version v1
* @description This file initialises the docs server and mounts its static paths.
*/
const Koa = require('koa');
const serve = require('koa-static');
const mount = require('koa-mount');
const app = new Koa();
app.use(mount('/', serve('./docs/jsdocs'))) // serve JSDocs
app.use(mount('/openapi', serve('./docs/openapi'))) // serve OpenAPI
app.use(mount('/schemas', serve('./schemas'))) // serve schemas
let port = process.env.PORT || 3030;
app.listen(port);
console.log(`OpenAPI server running on port ${port}`)