Jonatan Nilsson
2b1e2d695a
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
base: Tweak serve to be slightly more extendable discord_embed: Added new site, discord embed
22 lines
587 B
JavaScript
22 lines
587 B
JavaScript
import config from '../base/config.mjs'
|
|
import Parent from '../base/server.mjs'
|
|
import IndexPost from './post.mjs'
|
|
import ServeHandler from './serve.mjs'
|
|
|
|
export default class Server extends Parent {
|
|
init() {
|
|
super.init()
|
|
let localUtil = new this.core.sc.Util(import.meta.url)
|
|
|
|
this.routes = {
|
|
post: new IndexPost({
|
|
frontend: config.get('frontend:url'),
|
|
})
|
|
}
|
|
this.routes.serve = new ServeHandler({
|
|
root: localUtil.getPathFromRoot('../public'),
|
|
version: this.core.app.running,
|
|
frontend: config.get('frontend:url'),
|
|
})
|
|
}
|
|
}
|