Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "cfhs-js", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Complex HTTP File Server", | ||
@@ -10,2 +10,3 @@ "main": "serverd.js", | ||
"bin": { | ||
"cfhs-js-ctl": "cfhsctl.sh", | ||
"cfhs-js-serverd": "serverd.js" | ||
@@ -12,0 +13,0 @@ }, |
@@ -81,2 +81,27 @@ # CFHS-js | ||
## Manage Instances | ||
### Create | ||
``` | ||
cfhs-js-ctl new MyInstanceName | ||
``` | ||
This will create the instance configuration directory. | ||
### Start & End Instances | ||
``` | ||
cfhs-js-ctl start MyInstanceName | ||
cfhs-js-ctl end MyInstanceName | ||
``` | ||
You may start and stop instances with the 2 subcommands. | ||
### Check Instance Status | ||
``` | ||
cfhs-js-ctl status-all | ||
``` | ||
## How Things Work | ||
@@ -83,0 +108,0 @@ |
#!/bin/node | ||
// -------------------------------------------- | ||
// Dependencies | ||
// -------------------------------------------- | ||
const os = require('os'); | ||
@@ -8,7 +11,17 @@ const fs = require('fs'); | ||
// -------------------------------------------- | ||
// Arguments | ||
// -------------------------------------------- | ||
const ITNAME = process.argv[2]; | ||
const VERB = process.argv[2]; | ||
const ITNAME = process.argv[3]; | ||
// -------------------------------------------- | ||
// Early bootloading | ||
// -------------------------------------------- | ||
console.log(`Starting instance: ~/.config/cfhs-js/${ITNAME}`); | ||
console.log(`My PID is ${process.pid} (${process.env.USER})`); | ||
console.log(typeof process.pid); | ||
fs.writeFileSync(`/tmp/run/cfhs-js.pid/${process.env.USER}/${ITNAME}`, process.pid.toString()); | ||
@@ -15,0 +28,0 @@ // -------------------------------------------- |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
49223
569
138
5
3