Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 958 Bytes

File metadata and controls

44 lines (29 loc) · 958 Bytes

Simple Express Server

Introduction

A simple HTTP server based on express.js that can be used to statically host files.

Installation

Clone the repository

git clone --recurse-submodules https://github.com/5G-MAG/rt-common-shared

Install dependencies

cd rt-common-shared/simple-express-server
npm install

Running

Start the webserver

npm start

Check the webserver

Navigate to http://localhost:3333/watchfolder/ to check that the webserver started correctly. You should see a message This worked!.

Configuration

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');

Hosting files

All files located in the public folder are automatically hosted. Simply drop your files in this folder.