Socket
Socket
Sign inDemoInstall

cews

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cews

Crud Express Web Server that has a bunch of dependencies set up already


Version published
Maintainers
1
Created
Source

Crud Express Web Server

Build Status

Simple wrapper for NodeJS Express that has a bunch of dependencies, ready for use.

What it includes:

  • Express, with gzip compression and session enabled.
  • Class.js that supports classical inheritance.
  • log4js for logging.
  • A Dispatcher that handles communication between the WebServer and a 3rd-party RESTful service.
  • ejs as templating.
  • underscore as utilities.
  • passport for talking to 3rd party APIs.

Getting started

Check out server.js for sample and configurations.

You can get started with importing the library:

var server = require('cews');

To initialize the server:

var app = new server.WebServer();
app.start();

Configurations are passed in the constructor:

var configs = {
	port: 3001, // Port to start
	cookieSecret: 'dummy-secret', // Secret token to encrypt cookie,
	resourceFolder: 'public', // Should be absolute path to public static resource folder, like css and UI js stuff
	log4js: {}, // Log4js configurations, checkout log4js doc for more details
	csrf: false, // Enable/Disable csrf
	cors: {
		domains: '*'	// Allow CORS
	}
};
var app = new server.WebServer(configs);
app.start();

Keywords

FAQs

Package last updated on 22 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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