Use cnpmjs.org and your own nfs to build your own npm
From here, you can get the mysql table and create your own mysql database.
The most simple way to use cnpmjs.org
is in custom-cnpm-example/simple.
Just custom your own config, then:
var cnpm = require('cnpmjs.org');
var config = require('./config');
cnpm.startWorker(config);
cnpm.startSync(config);
Then you get a single-process cnpm server.
To make your system more stable and reliable, mabey you need to enable cluster mode. Just look at custom-cnpm-example/cluster. You also can run cnpmjs.org
in cluster with other cluster modules.
Maybe you do not have a private file system to replace the qn file store
, we also provider a simple file system, which support cluster server. Just check out the example here: custom-cnpm-example/sfs.
$ cnpm install
# start simple sample
$ node simple
# start cluster sample
$ node cluster
# start sfs sample
$ node sfs
You can replace the default qn file store
by any other file store system, only need to follow this guide.
We provide aliyun oss and taobao tfs support. Just check it out.
MIT