express-nedb-rest
Advanced tools
Comparing version 1.2.5 to 1.2.6
{ | ||
"name": "express-nedb-rest", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "REST api for nedb database implemented in nodejs, based on express http server", | ||
@@ -14,4 +14,3 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "test.js", | ||
"start": "node test/test.js" | ||
"test": "node test/test.js" | ||
}, | ||
@@ -18,0 +17,0 @@ "repository": { |
var express = require('express'); | ||
var nedb = require('nedb'); | ||
var expressNedbRest = require('../index.js'); | ||
var path = require('path'); | ||
var expressNedbRest = require(path.join(__dirname, '../index.js')); | ||
@@ -8,6 +9,5 @@ // setup express app | ||
// local files for test frontend | ||
oApp.use('/index.html', express.static('index.html')); | ||
oApp.use('/spin.gif', express.static('spin.gif')); | ||
oApp.use('/index.html', express.static(path.join(__dirname, 'index.html'))); | ||
oApp.use('/spin.gif', express.static(path.join(__dirname, 'spin.gif'))); | ||
@@ -17,5 +17,5 @@ | ||
var restApi = expressNedbRest(); | ||
restApi.addDatastore('fruits', new nedb({ filename: "fruits.db", autoload: true })); | ||
restApi.addDatastore('animals', new nedb({ filename: "animals.db", autoload: true })); | ||
restApi.addDatastore('test', new nedb({ filename: "test.db", autoload: true })); | ||
restApi.addDatastore('fruits', new nedb({ filename: path.join(__dirname, 'fruits.db'), autoload: true })); | ||
restApi.addDatastore('animals', new nedb({ filename: path.join(__dirname, 'animals.db'), autoload: true })); | ||
restApi.addDatastore('test', new nedb({ filename: path.join(__dirname, 'test.db'), autoload: true })); | ||
@@ -22,0 +22,0 @@ // connect /rest path to REST service |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
103232
492
4