If we want to test the final build result of Vue or Hugo, we don’t have to use Nginx or Apache. Just install Serve
as a simple web server by NPM.
Version
Node 16.18.0
Serve 14.1.2
Add Serve
$ npm install -g serve
Use NPM to install Serve
as a global package.
Serve Current Folder
$ serve
Serve the current folder as a new site.
Serve Specific Folder
$ serve folder_name
Specify which folder you want to serve.
Conclusion
- Serve is a handy tool for a simple web server