Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

http://node-organic.com/ DNA loader, depending onhttps://www.npmjs.com/package/config

License

NotificationsYou must be signed in to change notification settings

camplight/cell-dna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You should be familiar withhttp://node-organic.com/ if you want to use this DNA loader.

This specific DNA loader assuming you're having adna folder outside ofnode_modules. It may have the following structure:

dna├── default.js├── development.js├── secrets.js├── staging.js└── test.js

In order to load specific DNA be sure to start your process with corresponding NODE_ENV.development is default DNA. Example usage:

$ NODE_ENV=staging node index.js // starts your process by using development.js DNA$ NODE_ENV=test node index.js // starts your process by using staging.js DNA

Be sure to check outhttps://github.com/lorenwest/node-config/wiki/Configuration-Files to better understand how to organize your cell DNA folder.

You can also add secrets.js inside your DNA folder (be sure to gitignore them ;)) and load them using the helper methodd:

constloadSecrets=require('cell-dna/load-secrets')const_=require('lodash')// optional dependency for your project, use whatever you like for deep copymodule.exports=_.merge({},loadSecrets(),{port:process.env.PORT||3001,database:{url:'http://localhost:8529',name:'local-db',},})

[8]ページ先頭

©2009-2025 Movatter.jp