Commit f3b1e2be authored by Giacomo Lavermicocca's avatar Giacomo Lavermicocca

add server file

parent 2b8327e5
const express = require('express');
const app = express();
const dirTree = require('directory-tree');
const fs = require('fs');
const http = require('http');
const request = require('request');
/* serves all the static files */
app.get(/^(.+)$/, function (req, res) {
console.log('static file request : ' + req.params);
//res.sendFile(__dirname + req.params[0]);
res.sendFile(__dirname + req.params[0]);
});
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(3000, () => console.log('Example app listening on port 3000!'))
\ 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