@rpcbase/server 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin.js ADDED
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ /* @flow */
3
+ const path = require("path")
4
+ require("dotenv").config({path: path.join(__dirname, "./.env")})
5
+ const yargs = require("yargs/yargs")
6
+ const {hideBin} = require("yargs/helpers")
7
+
8
+ const start_server = require("./start_server")
9
+
10
+ let is_command = false
11
+
12
+ const args = yargs(hideBin(process.argv))
13
+ .command("start", "run server/infrastructure", () => {}, (argv) => {
14
+ is_command = true
15
+ console.log("run start server/infrastructure")
16
+ start_server()
17
+ })
18
+ .command("ping", "ping", () => {}, (argv) => {
19
+ is_command = true
20
+ console.log("OING")
21
+ })
22
+ .option("verbose", {
23
+ alias: "v",
24
+ type: "boolean",
25
+ default: false,
26
+ description: "Run with verbose logging"
27
+ })
28
+ .parse()
29
+
30
+ if (!is_command) {
31
+ console.log("default command")
32
+ }
@@ -0,0 +1,11 @@
1
+ /* @flow */
2
+ const {execSync} = require("child_process")
3
+
4
+ const start_server = async() => {
5
+
6
+ execSync("docker-compose --help", {stdio: "inherit"})
7
+
8
+ console.log("Done.")
9
+ }
10
+
11
+ module.exports = start_server
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
+ "bin": {
7
+ "rb-server": "./bin.js"
8
+ },
6
9
  "scripts": {
7
10
  "test": "echo \"Error: no test specified\" && exit 0"
8
11
  },
9
12
  "dependencies": {
10
- "glob": "7.2.0"
13
+ "connect-redis": "6.0.0",
14
+ "glob": "7.2.0",
15
+ "redis": "3.1.2"
11
16
  }
12
17
  }