Express HTTP File Server with Lusca and DDoS Rate Limiting
1.4K
Express HTTP File Server with Helmet and DDoS Rate Limiting
docker run --name redis -d -p 6379:6379 redisnpm install to setupnpm start to launch the server[Optional] To keep ExpressHTTP up and running behind the scenes, checkout PM2.
To properly enable session support in ExpressHTTP, you must utilize a Redis instance. By default ExpressHTTP connects to a Redis instance running on the localhost when the app is launched in production mode. To override these settings, see the Config Options below.
To setup a Redis instance if you do not have one running already: docker run --name redis -d -p 6379:6379 redis
Finally, run ExpressHTTP in production mode: NODE_ENV=production npm start
ExpressHTTP is also available on DockerHub.
Before Docker setup, ensure Redis is running and finally run the following command:
docker run -d -p 8888:8888 -e REDIS_HOST=1.2.3.4 -v ~/ExpressHTTP/public:/app/public --name ExpressHTTP --restart=always jonfairbanks/expresshttp
The following options can be passed in at runtime as ENV variables:
SESSION_SECRET: Either a string or array of secrets used to sign the session ID cookie
LOGGING: If true, an access.log will be created for incoming site requests using Morgan loggingRATE_LIMIT: If true, enables DDoS and RateLimit protections through ExpressSITE_ROOT: Override the default path files are served from (default: /public)PORT: Override the default address the ExpressHTTP app is served from (default: 8888)REDIS: If true, Express sessions will be saved in Redis (ideal for production)REDIS_HOST: Override the default address used to connect to Redis (default: 127.0.0.1)REDIS_PORT: Override the default port used to connect to Redis (default: 6370)Content type
Image
Digest
Size
88.7 MB
Last updated
about 5 years ago
docker pull jonfairbanks/expresshttp