Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ladjs/web

Package Overview
Dependencies
Maintainers
2
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ladjs/web - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

18

index.js

@@ -45,2 +45,3 @@ const http = require('http');

class Server {
// eslint-disable-next-line complexity
constructor(config) {

@@ -50,4 +51,3 @@ this.config = Object.assign(

cabin: {},
protocol: process.env.WEB_PROTOCOL | 'http',
port: process.env.WEB_PORT || 3000,
protocol: process.env.WEB_PROTOCOL || 'http',
ssl: {

@@ -314,2 +314,4 @@ key: process.env.WEB_SSL_KEY_PATH

// expose app and server
this.app = app;
this.server = server;

@@ -320,3 +322,8 @@

listen(fn) {
listen(port, fn) {
if (_.isFunction(port)) {
fn = port;
port = null;
}
const { logger } = this.config;

@@ -331,6 +338,9 @@ if (!_.isFunction(fn))

this.server = this.server.listen(this.config.port, fn);
this.server = this.server.listen(port, fn);
return this.server;
}
close(fn) {
this.server.close(fn);
return this;
}

@@ -337,0 +347,0 @@ }

{
"name": "@ladjs/web",
"description": "Web server for Lad",
"version": "0.0.6",
"version": "0.0.7",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -14,3 +14,3 @@ "bugs": {

"dependencies": {
"@ladjs/auth": "^0.0.3",
"@ladjs/auth": "^0.0.4",
"@ladjs/i18n": "^0.0.8",

@@ -17,0 +17,0 @@ "@ladjs/koa-better-static": "^1.0.5",

@@ -38,31 +38,5 @@ # [**@ladjs/web**](https://github.com/ladjs/web)

```js
#!/usr/bin/env node
const Server = require('@ladjs/web');
const Graceful = require('@ladjs/graceful');
See <https://github.com/ladjs/lad/blob/master/template/web.js> for the most up to date usage example.
const config = require('./config');
const routes = require('./routes');
const { i18n, logger } = require('./helpers');
const { Users } = require('./app/models');
const server = new Server({
Users,
routes: routes.web,
logger,
i18n,
meta: config.meta,
views: config.views
});
if (!module.parent) {
server.listen();
const graceful = new Graceful({ server, logger });
graceful.listen();
}
module.exports = server;
```
## Contributors

@@ -69,0 +43,0 @@

Sorry, the diff of this file is not supported yet

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