Socket
Socket
Sign inDemoInstall

clout-js

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clout-js

Clean, simplistic, enterprise grade full-stack NodeJS framework


Version published
Weekly downloads
15
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

Clout Javascript Framework Build Status

Install

$ npm install clout-js --save

Module Development

These commands should be run in this directory.

Run tests

npm run test

Create documentation

npm run jsdoc

Run application with this instance

APPLICATION_PATH=<clout-js-applcaiton> npm run start

Usage

const clout = require('clout-js');

clout.start();

clout.on('started', () => {
	['https', 'http'].forEach((key) => {
		let server = clout.server[key];
		if (server) {
			let port = server.address().port;
			console.info('%s server started on port %s', key, port);
		}
	});
});

Clout Application Loader default paths

The following folders are default application searchpath.

Directorypurpose
/confcontains configuration w/ support for NODE_ENV
/apiscontains apis for the application
/hookshooks which can be invoked before an api
/modelscontains models (native support for sequalize)
/publicpublic assets folder
/controllerscontains controllers for application

Enviromental Config

NODE_ENV=development npm run start

You can load different configuration files depending on the env variables. For example, the usage of NODE_ENV=development (default) would load the following configuration files into the application;

  • conf/default.js
  • conf/**.development.js
  • conf/development.js

Another example is NODE_ENV=production which would load the following files;

  • conf/default.js
  • conf/**.production.js
  • conf/production.js

Clout-JS Module List

package-namedescription
clout-redis-sessionClout module to leverage Redis for sessions
clout-passportClout module to implement passport
clout-parseParse module
clout-mongooseClout module to leverage mongoose for models
clout-18nClout module to implement i18n
clout-socket-ioClout module to leverage socket.io
clout-sequelizeClout module to leverage sequelize for models
clout-flashFlash message middleware module for Clout-JS

Keywords

FAQs

Package last updated on 11 Feb 2018

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