New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-api-routes

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-api-routes - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

28

index.js

@@ -11,2 +11,3 @@ 'use strict';

const Routes = require('./lib/Routes');
const nodeWatch = require('node-watch');

@@ -29,2 +30,11 @@

// make routes!
this.doWork()
this.watchForFileChange()
return this.config.app;
}
doWork() {
// setup controllers

@@ -48,4 +58,20 @@ new Controllers(this.config);

}
return this.config.app;
watchForFileChange() {
if (process.NODE_ENV === 'production') { return }
const self = this;
nodeWatch([
this.config.policiesDir,
this.config.controllersDir,
path.join(this.config.rootDir,'config','routes.js')
],
function(filename) {
console.log('+++ ExpressApiRoutes - file has changed:');
console.log(` ${filename}`);
console.log('+++ Reloading routes...');
self.doWork();
});
}

@@ -52,0 +78,0 @@

5

package.json
{
"name": "express-api-routes",
"version": "1.0.3",
"version": "1.1.0",
"description": "",

@@ -13,3 +13,4 @@ "main": "index.js",

"dependencies": {
"express": "^4.14.0"
"express": "^4.14.0",
"node-watch": "^0.4.0"
},

@@ -16,0 +17,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc