portal-static

NodeJS server for static files

Usage no npm install needed!

<script type="module">
  import portalStatic from 'https://cdn.skypack.dev/portal-static';
</script>

README

portal-static

A NodeJS web server for static files

Description

You can create your own web server to serve up your static resources just by one command.

Installation

npm i -g portal-static

Usage

Make the current working directory as the root directory of static resources

portal-static

Set the port number to be 8080

portal-static -p 8080

Set the hostname to be localhost

portal-static -h localhost

Set the root directory to be /usr

portal-static -d /usr