Socket
Socket
Sign inDemoInstall

leajs-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leajs-server - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

35

lib/lea.js

@@ -29,5 +29,6 @@ var Lea, Promise, Stream, fs, hookUp, http, path, readConf, util;

return this.whenLoaded = new Promise(async(resolve, reject) => {
var arr, config, e, fn, getAccepted, getQuery, getRequest, hyphenate, i, init, isArray, len, position, respond, server;
var arr, config, e, fn, getAccepted, getQuery, getRequest, hyphenate, i, init, isArray, len, position, resetAllActions, respond, server;
try {
({config, respond, position, init} = this);
({config, respond, position, init, resetAllActions} = this);
resetAllActions();
({hyphenate, getAccepted, getQuery, isArray} = util);

@@ -201,3 +202,3 @@ respond.hookIn(position.init, (o) => {

}
if (config.listen !== false) {
if (config.listen !== false && !this.isCancelled) {
return server.listen(config.listen, () => {

@@ -269,10 +270,14 @@ var chalk, connectionString, host, ip, port;

base: new Lea,
cancel: async({resetAllActions, close}) => {
await close().catch((e) => {
return console.log(e);
});
return resetAllActions();
cancel: async(lea) => {
if (!lea.isCancelled) {
lea.isCancelled = true;
await lea.close();
lea.resetAllActions();
return lea.isCancelled = false;
}
},
cb: (lea) => {
return lea.startUp();
cb: async(lea) => {
if (options.startUp !== false) {
return (await lea.startUp());
}
}

@@ -283,10 +288,4 @@ });

module.exports.getConfig = () => {
return readConf({
name: "leajs.config",
folders: ["./server", "./"],
schema: path.resolve(__dirname, "./configSchema"),
plugins: {
paths: [process.cwd(), path.resolve(__dirname, "..")]
},
base: new Lea
return module.exports({
startUp: false
});

@@ -293,0 +292,0 @@ };

{
"name": "leajs-server",
"description": "extendable, configuration based http server",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/lea-js/",

@@ -28,5 +28,5 @@ "author": {

"coffee-loader": "^0.9.0",
"coffeescript": "^2.3.1",
"script-runner": "^0.1.7",
"snapy": "^0.1.3"
"coffeescript": "^2.3.2",
"script-runner": "^0.1.8",
"snapy": "^0.1.6"
},

@@ -46,15 +46,15 @@ "keywords": [],

"chalk": "^2.4.1",
"fs-extra": "^6.0.1",
"fs-extra": "^7.0.1",
"hook-up": "^0.2.5",
"ip": "^1.1.5",
"yaku": "^0.18.6",
"hook-up": "^0.2.2",
"read-conf": "^0.4.3",
"leajs-cache": "^0.1.0",
"leajs-encoding": "^0.1.0",
"leajs-eventsource": "^0.1.0",
"leajs-files": "^0.1.0",
"leajs-folders": "^0.1.0",
"leajs-eventsource": "^0.1.0",
"leajs-locale": "^0.1.0",
"leajs-redirect": "^0.1.0"
"leajs-redirect": "^0.1.0",
"read-conf": "^0.5.1",
"yaku": "^0.19.3"
}
}

@@ -6,7 +6,4 @@ # Leajs

## Features
- Snapshots only - forces you to do proper tests of input -> output
- Interactively shows you the output and asks about it
- Uses webpack bundles to track changes
- Watches test files and dependencies
- Static analysis of tests to make writing them as easy as possible
- easily extendable by using [hook-up](https://github.com/paulpflug/hook-up)
- configuration based by using [read-conf](https://github.com/paulpflug/read-conf)

@@ -123,3 +120,3 @@ ### Install

- [leajs-spa-router](https://github.com/lea-js/leajs-spa-router) - single page router
- [leajs-webpack](https://github.com/lea-js/leajs-webpack) - webpack development and hot middleware
- [leajs-webpack](https://github.com/lea-js/leajs-webpack) - webpack development and hot reload middleware

@@ -126,0 +123,0 @@ ## License

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