Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/longlho/cews
Simple wrapper for express that has a bunch of dependencies, ready for use
https://github.com/longlho/cews
Last synced: about 2 months ago
JSON representation
Simple wrapper for express that has a bunch of dependencies, ready for use
- Host: GitHub
- URL: https://github.com/longlho/cews
- Owner: longlho
- Created: 2012-10-17T01:33:43.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-22T17:33:10.000Z (almost 12 years ago)
- Last Synced: 2024-04-15T12:17:29.352Z (9 months ago)
- Language: JavaScript
- Size: 199 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Crud Express Web Server
===
[![Build Status](https://secure.travis-ci.org/longlho/cews.png)](https://secure.travis-ci.org/longlho/cews)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();