Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorgecasar/simple-nodejs-server
A NodeJS server very simple to serve statics. Customized port, path and HTML5 Push State
https://github.com/jorgecasar/simple-nodejs-server
Last synced: 23 days ago
JSON representation
A NodeJS server very simple to serve statics. Customized port, path and HTML5 Push State
- Host: GitHub
- URL: https://github.com/jorgecasar/simple-nodejs-server
- Owner: jorgecasar
- License: mit
- Created: 2013-12-31T14:18:44.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-31T14:50:40.000Z (almost 11 years ago)
- Last Synced: 2024-10-05T08:57:25.229Z (about 1 month ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 7
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple NodeJS Server
====================A NodeJS server very simple to serve statics. Customized port, path and HTML5 Push State.
## How to start
The default arguments are set for a fast start but you can customize them to make the script powerfull. You don't need clone the project within each project.1. Clone the project in your workspace's root path with ```git clone https://github.com/jorgecasar/simple-NodeJS-server.git```
2. Go to "simple-NodeJs-server'
3. Install dependencies: ```npm install -d```
4. Go to your project, p.e '[workspace-root]/myProject/'
5. Start the Node server: ```node ../simple-node-server/server```
6. Enjoy your new server at http://localhost:8888### Arguments
1. Port: by default is the port 8888, you can customize the port to set up several server.
2. Path: is the path of your project, by dafault is '.', you can specify any directory of your computer.
3. disablePushState: by default it's enabled, then you won't get a 404 when a file doesn't exist. It will return the index.html of your root.