no

HTTP Server for Serving Static Content

I. Introduction There are times when we want to serve static HTML files from our network. For example, in my case, I'm creating docume...

I. Introduction

There are times when we want to serve static HTML files from our network. For example, in my case, I'm creating documentation for asciidoc. To review my changes I will need to deploy my HTML files on an HTTP server so that it will be available on the network.

II. NPM Serve

Here comes the npm serve, it's a lightweight HTTP that is freely available.

Usage: There are 2-ways in which serve can be run:

1.) By installing and running:
>npm install serve -g
>serve

serve must be executed in the directory which you want to serve.

2.) By using npx:
>npx serve

Without installing, serve can be run with npx.

III. Reference

  • http://localhost:5000

Related

coding 5914919132822770504

Post a Comment Default Comments

item