Skip to content

This repository holds a simple server that serves a dist folder. Whenever a change is detected in this folder, the server deletes its cache and serves the new content

License

Notifications You must be signed in to change notification settings

Informatievlaanderen/OSLO-Simple-Server

Repository files navigation

OSLO Simple Server

OSLO Simple Server is a static content server that automatically detects changes in the content and reloads using a CRON job to display the updated content. This server is designed to serve the content in the dist folder.

Getting Started

Install the dependencies: npm install Build the project: npm run build Start the server: npm start quick setup: npm run dev

Environment Variables

You can specify the following environment variables in the .env file. Please refer to the .env.example file for an example.

Variable Description Default
PORT The port on which the server runs. 3000
TARGET_DIR The directory that the server serves. dist
TMP_DIR The temporary directory used for downloading and extracting updated content. tmp
FILE_URL The URL from which the server fetches the updated content. undefined
FILE_NAME The name of the file that the server downloads from the FILE_URL. dist.tar

Docker

Build the Docker image

docker build -t oslo-simple-server .

Run the Docker container

docker run -d -p 8080:3000 oslo-simple-server  # Replace 8080 with the port you want to use and 3000 with the port from your .env

About

This repository holds a simple server that serves a dist folder. Whenever a change is detected in this folder, the server deletes its cache and serves the new content

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published