Initial add

parents
Pipeline #780 canceled with stages
node_modules
node_modules
require('./to-include.js')
\ No newline at end of file
const bankai = require('bankai/http')
const express = require('express')
const httpsServer = require('@ind.ie/https-server')
const path = require('path')
const compiler = bankai(path.join(__dirname, 'client.js'))
const app = express()
// TODO: Add WebSocket route.
// Server-side routes go here.
app.get('/hello', (request, response) => {
response.writeHeader(200, {'Content-Type': 'text/html'})
response.end('<!doctype html><html lang=\'en\'><head><meta charset=\'utf-8\'/><title>Hello</title></head><body>Hello!</body></html>')
})
// Finally, use Bankai.
app.use(compiler)
const server = httpsServer.createServer({}, app)
server.listen(443, () => {
console.log('Listening on port 443.')
})
This diff is collapsed.
{
"name": "bankai-express",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@ind.ie/https-server": "^2.0.0",
"bankai": "git+https://aral@github.com/aral/bankai.git#hypha",
"express": "^4.16.4"
}
}
console.log('hello there, Laura')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment