1 **The content on this page does not work. Currently, there is no plan to run ipm server. This document will leave for discussion in the future.**
3 IoT.js follows the practice of node.js npm to provide module development community with separate IoT.js own registry.
5 * To see what it actually is, please visit [www.npmjs.com](https://www.npmjs.com/), and also [docs.npmjs.com](https://docs.npmjs.com/).
6 * To avoid confusion with the original server, we'll call it "ipm", for IoT.js Package Manager.
7 * Current status of "ipm" is started and it's for developers so has no separate web page. We need to develop them.
8 * "npm" program is used for publish and download modules. We may fork when customization is needed.
12 sudo apt-get install npm
17 As ipm uses different server, you need to change registry information
19 npm config set registry="http://ipm.iotjs.net:5984/registry/_design/app/_rewrite"
22 ### Adding your account
24 You may have to register your account if you plan to publish some packages, for example,
26 npm set init.author.name "Your Name"
27 npm set init.author.email "you@example.com"
28 npm set init.author.url "http://yourblog.com"
31 Please set to your real name and email address. url is optional.
35 cd to your package folder you wish to publish and init
40 It'll ask information for your package, for an example;
42 Press ^C at any time to quit.
44 version: (1.0.0) 0.0.1
45 description: simple echo server
46 entry point: (index.js)
51 About to write to /(your working folder)/package.json:
55 "description": "simple echo server",
58 "test": "echo \"Error: no test specified\" && exit 1"
60 "author": "(your name) <your email address> (your blog page)",
67 and all things are good to go, publish.
72 Please visit [npmjs.org](https://docs.npmjs.com/getting-started/publishing-npm-packages) for detailed explanations.
75 ### About the license of each packages
77 IoT.js is released under Apache 2.0 license, [this page](../License.md). We assume you also agree on this license when publishing to ipm registry.
79 ### Downloading packages
81 "npm" provides local and global packages and you may be working on some powerful machines. In IoT devices this may be somewhat different. It may not have enough memory, power, network or even no console to give commands. So it can have several scenarios depending on the device you may be working on. This may be some of them;
83 1) Download to your machine with Linux, Mac or Windows.
84 * Install packages to your powerful machine
85 * Send it to the IoT device through copy to memory card
86 * or send through serial line, BT, USB with old time kermit or z-modem
88 2) If it has a WiFi the download directly from the registry
89 * But to make this work, we need to develop a small shell program with iotjs.
90 * This can be done with built-in module downloader, we need to develop this.
91 * Issue [#75](https://github.com/Samsung/iotjs/issues/75) to track
93 3) If your IoT is very small and even has no writable file system
94 * Package modules should be built-in to IoT.js at compile time.
95 * We should also develop this.
102 (cd to some working directory)
103 npm install <package name>
104 (copy node_modules folder to your device)
107 As mentioned above, npm has local and global packages. But for IoT.js lets stick on the local only. For some cases running on ROTS there may not be any globals place.
111 You may use ipm packages freely under Apache 2.0 license, read [this page](../License.md)
113 ### Searching for packages
115 Searching is possible with search command. See [docs.npmjs.com/cli/search](https://docs.npmjs.com/cli/search).
121 If you omit the keyword, it'll list all packages registered.