Software Registries

Abel Sanchez and John R. Williams

Software Platform




Software Distribution

App Store

Google Play


Software Registry



Sign Up

Login to NPM

					$ npm login

Let's Create a New Package

Let's start by creating a new directory

					$ mkdir newdir

					$ cd newdir

Add Some Code

Let's add a greeting function

					exports.greeting = function(){
						console.log('Hello World!');

Add Metadata

Use npm's init to generate metadata

					$ npm init

Sample Metadata

Sample package.json file

					  "name": "newdir",
					  "version": "1.0.0",
					  "description": "simple greeting function",
					  "main": "index.js",
					  "scripts": {
					    "test": "echo \"Error: no test specified\" && exit 1"
					  "author": "",
					  "license": "MIT"

Publish to NPM

Push code to registry

					$ npm publish

Confirm Code Is Live

Active Learning

Consume module published by classmate