mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-service.git
synced 2026-09-21 16:52:03 -07:00
Bootstrap server
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
import Koa from 'koa'
|
||||||
|
import bodyParser from 'koa-bodyparser'
|
||||||
|
import convert from 'koa-convert'
|
||||||
|
|
||||||
|
import config from './config'
|
||||||
|
import { errorMiddleware } from '../src/utils'
|
||||||
|
|
||||||
|
const app = new Koa()
|
||||||
|
|
||||||
|
app.use(errorMiddleware())
|
||||||
|
app.use(convert(bodyParser()))
|
||||||
|
|
||||||
|
const router = require('../src/controllers')
|
||||||
|
router(app)
|
||||||
|
|
||||||
|
app.listen(config.port, () => {
|
||||||
|
console.log(`Server started on ${config.port}`)
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user