Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| From https://nodejs.org/api/modules.html | |
| require(X) from module at path Y | |
| 1. If X is a core module, | |
| a. return the core module | |
| b. STOP | |
| 2. If X begins with './' or '/' or '../' | |
| a. LOAD_AS_FILE(Y + X) | |
| b. LOAD_AS_DIRECTORY(Y + X) | |
| 3. LOAD_NODE_MODULES(X, dirname(Y)) |
| function http(method, url, request) { | |
| let init = { method: 'GET' } | |
| if(method != 'GET') { | |
| init.body = request.body | |
| } | |
| return fetch(url, init). | |
| then(function(response){ | |
| if(response.ok){ | |
| response.json().then(function(json){ |