Skip to content

lucascaprio/node-localhost-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Localhost Server

A Node.js server for localhost environment.


Dependencies

  1. Node.js
  2. npm

Installation

cd node-localhost-server
npm install

Configuration

Inside the root directory, there is a directory named projects. This directory is where you will put all your projects.

You can still configure vhosts (see server.js with examples). Don't forget to configure your hosts file like:

# LOCALHOST
127.0.0.1 example.com example.com.br

Problems with ports

If you have some problems with ports on Linux, you can run:

# Enable your user to run node apps on the default HTTP port (80)
sudo apt-get install libcap2-bin
sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\``

Commands

Run

npm run start
# localhost listening using ports 80 and 443

List

npm run list

Stop

npm run stop

References

About

A Node.js server for localhost environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published