npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-web-kit

v2.2.7

Published

Node web starter kit for quick development

Downloads

21

Readme

node-web-kit

Building Status Dependency Status

Node web starter kit for quick development, which uses express as MVC,
and gulp as streaming build tool,
and less/sass for css, css task by default, which uses scss, change it to less for less files in related gulp files,
browserify to building js, also supports proxy for your app's restful api

###Usage

npm install node-web-kit //or clone the project
cd ${path}/node-web-kit //go to the project root
npm install  
gulp dev //using gulp directly, you may need to install gulp globally

other tasks: gulp watch, gulp css, gulp js, gulp js.lib, more in the gulpfile.js and ./gulp

npm start to start the server

###Logs
The logs will be put in logs folder

###config.json.sample [NOTICE]Add Multi API Endpoints support, API_ENDPOINT has changed to API_ENDPOINTS, and other related properties removed
This config file has couple configuration samples for your app, it will create create a config.json file while you using gulp or npm start automatically, or you can just copy that by yourself.
All the config can also be set in your environment variable, which has higher priority.

{
  //server port  
  "NODE_PORT": 3000,   
  //Node env, also could be development/dev, production/prod, add more as you wish  
  "NODE_ENV": "development",
  //if you need to enable the api proxy  
  "NODE_PROXY": true, 
  //`request` debug level,
  //1: only use `request.debug = true`, 2: also add `request-debug`, default: no debug info.
  "PROXY_DEBUG_LEVEL": 1, 
  "STATIC_ENDPOINT": "", //host for static assets, need other coding
  "API_ENDPOINTS": {
    "/prefix": "http://localhost:3001", //: /prefix/api1/login --> http://localhost:3001/api1/login
    "/prefix2": "http://localhost:3002"
  }
}

Template Engines

Default template engine is nunjucks,
Since we are using the consolidate.js, you can use any template engine you want.

###Production Mode

Make sure you set the NODE_ENV=production or set NODE_ENV to prod or production in config.json
And just run the npm run prod ... to simply start/reload the node server with PM2,
npm run prod -- moduleName instanceNumber skipInstall default moduleName is "app"
npm run prod, which will start/reload app in maximum instances(cpu cores), default instance name is app
npm run prod -- app 2, which will start/reload app with 2 instances enabled
npm run prod -- app 0 1, which will start app with maximum(0 == maximum) instances, but skip 'npm install' or create your own script if needed

License

The MIT License (MIT)

Copyright (c) 2016 jason

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.