Comparing version 0.1.5 to 0.1.6
@@ -12,3 +12,3 @@ "use strict"; | ||
*/ | ||
debug: true, | ||
debug: false, | ||
@@ -15,0 +15,0 @@ /** |
{ | ||
"name": "minoss", | ||
"title": "Mini Node Script Server", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Mini Node Script Server - Simple API Server with auto-loading, abstraction and configuration handling for IoT automation.", | ||
@@ -6,0 +6,0 @@ "main": "server.js", |
@@ -16,2 +16,3 @@ # Minoss - Mini Node Script Server | ||
* [Installation](#installation) | ||
* [Installation in own Folder](#installation-in-own-folder) | ||
* [Install Modules](#install-modules) | ||
@@ -48,4 +49,20 @@ * [Configuration](#configuration) | ||
## Installation | ||
Inside a folder where you want to install Minoss you just need to download the project files. | ||
Minoss can easily be installed with [npm](https://npmjs.com). | ||
```SH | ||
$ npm install minoss | ||
``` | ||
If installed this way, it's only needed to require `minoss` in the starting script file. | ||
Like in an own `server.js` file: | ||
```JS | ||
require("minoss"); | ||
``` | ||
### Installation in own Folder | ||
Another way is, inside a folder where wanted to install Minoss, just to download the project files. | ||
It's possible to download the [`zip` archive from GitHub](https://github.com/eisbehr-/minoss/archive/master.zip) or use `git` to download the latest files. | ||
With this way the core files of Minoss are stored inside the root folder. | ||
@@ -52,0 +69,0 @@ ```SH |
@@ -17,4 +17,4 @@ /** | ||
var parser = require("body-parser"); | ||
var config = require("./config/server"); | ||
var routes = require("./config/routes"); | ||
var config = require("./src/config").server; | ||
var routes = require("./src/config").routes; | ||
var handler = require("./src/handler"); | ||
@@ -21,0 +21,0 @@ var _ = require("./src/formatter"); |
@@ -30,4 +30,4 @@ "use strict"; | ||
var localScript = false; | ||
var dir = "./" + module; | ||
var dir = process.cwd() + "/" + module; | ||
var file = dir + "/" + script + ".js"; | ||
@@ -73,3 +73,3 @@ | ||
cache[module] = {name: module, node: false, scripts: {}}; | ||
cache[module].scripts[script] = "." + file; | ||
cache[module].scripts[script] = file; | ||
@@ -167,3 +167,3 @@ debug("- local module script '" + module + "/" + script + "' found"); | ||
// local module | ||
var localFiles = this.configLocator(configs, "./" + module + "/config"); | ||
var localFiles = this.configLocator(configs, process.cwd() + "/" + module + "/config"); | ||
@@ -180,3 +180,3 @@ if( localFiles ) { | ||
// local config override | ||
var overrideFiles = this.configLocator(configs, "./config/" + module); | ||
var overrideFiles = this.configLocator(configs, process.cwd() + "/config/" + module); | ||
@@ -183,0 +183,0 @@ if( overrideFiles ) { |
"use strict"; | ||
var config = require("../config/server"); | ||
var config = require("./config").server; | ||
@@ -5,0 +5,0 @@ /** |
"use strict"; | ||
var messages = require("../config/messages"); | ||
var messages = require("./config").messages; | ||
@@ -5,0 +5,0 @@ /** |
"use strict"; | ||
var config = require("../config/server"); | ||
var config = require("./config").server; | ||
var xml = require("js2xmlparser"); | ||
@@ -5,0 +5,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
34794
15
581
392
11