GithubHelp home page GithubHelp logo

jkuri / morose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bleenco/morose

0.0 3.0 0.0 1.4 MB

npm registry on your own servers

License: MIT License

TypeScript 79.12% JavaScript 2.43% HTML 15.25% CSS 3.20%

morose's Introduction

morose

Build Status

Run npm registry or npm proxy on your own servers.

morose allows you to have a local npm registry with zero configuration. You don't have to install and replicate an entire CouchDB database. morose keeps its own small database and, if a package doesn't exist there, it asks npmjs.org for it keeping only those packages you use.

Table of contents

Compatibility

morose is compatible with npm version 5 and beyond.

Use cases

  • Use private packages.

If you want to use all benefits of npm package system in your company without sending all code to the public, and use your private packages just as easy as public ones.

  • Cache npmjs.org registry.

If you have more than one server you want to install packages on, you might want to use this to decrease latency (presumably "slow" npmjs.org will be connected to only once per package/version) and provide limited failover (if npmjs.org is down, we might still find something useful in the cache).

  • Override public packages.

If you want to use a modified version of some 3rd-party package (for example, you found a bug, but maintainer didn't accept pull request yet), you can publish your version locally under the same name.

Installation

$ npm install morose -g

Usage

Running a Server

morose

When you start a server for the first time, configuration is created in ~/.morose directory.

Now you can navigate to http://localhost:10000 in your browser where your packages can seen and searched.

Setting up npm config to use morose

npm set registry http://localhost:10000

Running tests

  • server unit tests
node tests/run.js
  • server end-to-end tests
node tests/run_e2e.js
  • app end-to-end Protractor tests

First make sure morose is running, then;

npm run protractor

Hacking on morose

Running from source

  1. Clone this repository
git clone https://github.com/bleenco/morose.git --depth 1
  1. Build morose project
npm run build:prod
  1. Link morose to have global command
npm link
  1. Run command
morose

...or, you can skip steps 2., 3. and 4. and start project in dev mode

npm run dev

Setting up nginx reverse proxy

server {
  listen 80;
  server_name morose.example.com;

  location / {
    proxy_set_header        Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    proxy_pass              http://localhost:10000;
  }
}

Inspiration

morose is heaviliy inspired by sinopia and we also used some stuff from there. The main reason to make a new package with similar behavior is that sinopia is not updated anymore and as far as we know some npm commands doesn't work there.

morose is build with in the way that is compatible with the newest npm releases.

LICENCE

MIT

morose's People

Contributors

irmana avatar izak88 avatar jkuri avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.