A simple HTTP server based on express.js that can be used to statically host files.
git clone --recurse-submodules https://github.com/5G-MAG/rt-common-shared
cd rt-common-shared/simple-express-server
npm install
npm start
Navigate to http://localhost:3333/watchfolder/
to check that the webserver started correctly. You should see a
message This worked!
.
By default, the server runs on port 3333
. If you need to change the port edit
the bin/www
file and change the default port. For instance, to use port 5555
:
var port = normalizePort(process.env.PORT || '5555');
All files located in the public
folder are automatically hosted. Simply drop your files in this folder.