Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
npm install nodame
CURRENTLY UNSTABLE!!!
A Node.js framework built on Express 4.0 with some features to help in increasing development productivity. Nodame uses both third-party and private modules.
It supports cross-platform development! You can freely develop your node team project directly on your laptop without needing a VM or anything!
npm install -g mocha
(Only if you are going to use the unit testing)Installing Nodame is nothing more simpler than executing npm install nodame
.
Create project directory
mkdir ./new_project && cd ./new_project
Create package.json
npm init
Install nodame package
npm install --save nodame@~1.1.0
Check the release updates for the latest stable version.
Build project's files
./node_modules/nodame/build.sh
You can run your application by executing index.js
. Your default project can be accessed through your browser at http://localhost:3000/my-project.
P.S.: You might want to set cookie domain to
""
,NULL
, orFALSE
; if you are usinglocalhost
as your domain. See Cookie Specification.
node index.js [options]
Option | Default | Description |
---|---|---|
-c , --config <file> | ./config-devel | Config file location |
-e , --env <env> | development | Application environment |
-S , --staging | Set staging environment | |
-P , --production | Set production environment | |
-p , --port | Set port | |
-t , --test | Run test |
Example:
```bash
node index.js --config ~/config/main.ini
```
Install nodemon
npm install -g nodemon
This will install nodemon globally
Run nodemon
nodemon index.js [option]
Release | Version |
---|---|
Stable | 1.1.0 |
Release candidate | - |
nodame/path
modulereq.body
nodame.service()
, changed to nodame.require('service/')
nodame.middleware()
, changed to nodame.require('middleware/')
nodame.handler()
, changed to nodame.require('handler/')
{{config.name}}
%config.name%
(config_value|encode_url)
Automates routing as defined in config.
Auto-config menu.
Handlers.
Services.
Middlewares.
Views.
Provides automated assets generation of javascript and stylesheet files for production. It minifies and combines assets as defined in config.
Unit testing using BDD style.
Public methods are methods or objects that can be ran throughout the environment.
nodame.appPath()
Return application's absolute path.
var appPath = nodame.appPath();
// return '/absolute/path/to/app'
nodame.argv
Return argv object
node index.js --env development
var env = nodame.argv.env;
// return 'development'
nodame.config()
Return config's value by passing selector. Please see nodame.settings
for direct access to config's object.
var baseUrl = nodame.config('server.url.base');
// return server.url.base in config
nodame.enforceMobile()
Middleware to enforce mobile view. Not to be used in application.
nodame.env()
Return application's environment
var env = nodame.env();
return 'development'
nodame.express()
Return new Express' object.
var express = nodame.express();
// return new express' object
nodame.handler(name string)
Deprecated in 1.0.1. Please see nodame.require()
nodame.isDev()
Return whether it's development environment. Production and staging are considered as non-development environment.
if (nodame.isDev()) {
console.log('Hello Dev!');
}
nodame.locals()
Middleware to register locals variable. Not to be used in application.
nodame.middleware()
Deprecated in 1.0.1. Please see nodame.require()
nodame.require(name string)
Native's require wrapper. You are encouraged to use this method instead of native's method as the native method won't load npm modules imported by nodame and nodame modules.
var path = nodame.require('path');
// return native's module path
var request = nodame.require('nodame/request');
// return nodame module request
var foo = nodame.require('module/foo');
// return custom module foo as located in /modules
nodame.router()
Return new express.Router().
var router = nodame.router();
// return express.Router()
nodame.service(name string)
Deprecated in 1.0.1. Please see nodame.require()
nodame.set(name string, obj object)
Register object to nodame.settings.__systems
. Not to be used in application.
nodame.settings
Return settings value directly. This is a call to nodame.setting
. You can use this to return config value directly by using nodame.settings.config
, for calling config indirectly please see nodame.config()
.
var baseUrl = nodame.settings.config.server.url.base;
// return server.url.base
nodame.sysPath()
Return system's path. Not to be used in application.
sprintf
sprintf(string format , [mixed arg1 [, mixed arg2 [ ,...]]])
Public method to sprintf
var foo = 'wooof';
var bar = 'booo!';
var str = sprintf('It sounds like %s but actually %s', foo, bar);
// return 'It sounds like wooof but actually booo!'
vsprintf()
Same as sprintf()
but accept arrays.
var foo = vsprintf('The first 4 letters of the english alphabet are: %s, %s, %s and %s', ['a', 'b', 'c', 'd']);
// return 'The first 4 letters of the english alphabet are: a, b, c, d'
Nodame comes with third-party modules and private modules which can be used using nodame.require()
.
Name | Version |
---|---|
async | ~0.9.0 |
body-parser | ~1.10.2 |
colors | ~1.0.3 |
commander | ~2.8.1 |
cookie-parser | ~1.3.3 |
debug | ~2.1.1 |
express | ~4.11.1 |
express-device | ~0.3.11 |
express-xml-bodyparser | ~0.0.7 |
js-sha512 | ^0.2.2 |
jumphash | ^0.2.2 |
log | ~1.4.0 |
mandrill-api | ~1.0.41 |
md5 | ^2.0.0 |
measure | ^0.1.1 |
method-override | ~2.3.2 |
morgan | ~1.5.2 |
node-dogstatsd | 0.0.6 |
node-uuid | ~1.4.3 |
numeral | ~1.5.3 |
parse-duration | ^0.1.1 |
query-string | ~1.0.0 |
raven | ^0.7.3 |
redis | ~0.12.1 |
serve-static | ~1.9.2 |
sprintf-js | ~1.0.2 |
swig | ~1.4.2 |
validate.js | ~0.6.1 |
<> with ❤︎ by ドラえもん
FAQs
Nodame is a Node.js framework based on express 4.0.
We found that nodame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.