https://github.com/lastmjs/nx-local-server
Install and run NGINX locally with NPM.
https://github.com/lastmjs/nx-local-server
Last synced: 3 months ago
JSON representation
Install and run NGINX locally with NPM.
- Host: GitHub
- URL: https://github.com/lastmjs/nx-local-server
- Owner: lastmjs
- License: mit
- Created: 2017-02-27T19:59:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T23:43:15.000Z (almost 8 years ago)
- Last Synced: 2025-02-20T01:07:58.411Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NX Local Server
Install and run NGINX locally with NPM.
## Installation
```
npm install nx-local-server
```## Use
### Create local config file
Create an NGINX configuration file and save it somewhere in your project.
All file paths in your configuration file should be relative to the root directory of this project, which by default will be installed to `node_modules/nx-local-server`.### Start NGINX server with local config
From the command line:
```
node_modules/.bin/nginx -p node_modules/nx-local-server -c ../../[local nginx conf file]
```From an NPM script:
```
// package.json
{
...
"scripts": {
"start": "nginx -p node_modules/nx-local-server -c ../../[local nginx conf file]"
}
...
}
```### Stop NGINX Server
From the command line:
```
node_modules/.bin/nginx -p node_modules/nx-local-server -s stop
```From an NPM script:
```
// package.json
{
...
"scripts": {
"stop": "nginx -p node_modules/nx-local-server -s stop"
}
...
}
```