Liveteract-JS-Library / server.js
server.js
Raw
/* server.js - Express server*/
'use strict';

const express = require('express')
const app = express();

const path = require('path');

app.use(express.static(path.join(__dirname, '/pub')))

app.get('/', (req, res) => {
	res.sendFile(path.join(__dirname, '/pub/index.html'))
})

app.get('/examples.html', (req, res) => {
	res.sendFile(path.join(__dirname,'/examples.html'))
})

app.get('/documentation.html', (req, res) => {
	res.sendFile(path.join(__dirname,'/documentation.html'))
})

const port = process.env.PORT || 5000
app.listen(port, () => {
	console.log(`Listening on port ${port}...`)
})