server stuff
This commit is contained in:
@ -1,8 +1,16 @@
|
||||
import * as http from 'http'
|
||||
import * as express from 'express'
|
||||
import * as path from 'path'
|
||||
import * as morgan from 'morgan'
|
||||
import * as fs from 'fs'
|
||||
|
||||
|
||||
let app = express()
|
||||
app.use('/', express.static(__dirname + '/../../dist'))
|
||||
|
||||
let accessLogStream = fs.createWriteStream(path.join(__dirname, '/../../../access.log'), {flags: 'a'})
|
||||
app.use(morgan('combined', {stream: accessLogStream}))
|
||||
|
||||
app.use('/', express.static(path.join(__dirname, '/../../../dist')))
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log('Example app listening on port 3000!')
|
||||
|
Reference in New Issue
Block a user