templates for services
This commit is contained in:
parent
efcb8669a0
commit
7817cfe94a
5
.gitignore
vendored
5
.gitignore
vendored
@ -105,4 +105,7 @@ temp
|
||||
.tern-port
|
||||
config/
|
||||
|
||||
docs
|
||||
docs
|
||||
|
||||
# Auto-Generated Services
|
||||
services
|
18
lib/templates/index.js.handlebars
Normal file
18
lib/templates/index.js.handlebars
Normal file
@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const path = require("path");
|
||||
const runNopeBackend = require("../../dist/lib/cli/runNopeBackend");
|
||||
if (require.main === module) {
|
||||
process.on("unhandledRejection", (reason, p) => {
|
||||
console.log("Unhandled Rejection at: Promise", p, "reason:", reason);
|
||||
console.error(reason);
|
||||
throw reason;
|
||||
});
|
||||
runNopeBackend
|
||||
.runNopeBackend({
|
||||
file: path.join(__dirname, "settings.json"),
|
||||
channel: "io-client",
|
||||
log: "debug"
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
10
lib/templates/linux.service.handlebars
Normal file
10
lib/templates/linux.service.handlebars
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description={{name}}
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/node {{pathFile}}
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user