Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Express | 61,051 | 1,122,978 | 79,504 | 2 days ago | 299 | April 29, 2022 | 173 | mit | JavaScript | |
Fast, unopinionated, minimalist web framework for node. | ||||||||||
Parse Server | 20,278 | 1,140 | 89 | 19 hours ago | 220 | September 20, 2022 | 396 | apache-2.0 | JavaScript | |
Parse Server for Node.js / Express | ||||||||||
Apollo Server | 13,373 | 5,326 | 1,153 | 2 days ago | 305 | August 26, 2022 | 41 | mit | TypeScript | |
🌍 Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more. | ||||||||||
Node Oauth2 Server | 3,871 | 419 | 129 | 3 months ago | 24 | June 07, 2021 | 190 | mit | JavaScript | |
Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js | ||||||||||
Grant | 3,771 | 210 | 41 | 6 months ago | 98 | March 09, 2022 | 23 | mit | JavaScript | |
OAuth Proxy | ||||||||||
Graphql Ws | 1,467 | 10 | 18 days ago | 84 | July 01, 2022 | mit | TypeScript | |||
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client. | ||||||||||
Simple React Full Stack | 1,410 | 2 years ago | 1 | JavaScript | ||||||
Boilerplate to build a full stack web application using React, Node.js, Express and Webpack. | ||||||||||
Puer | 1,221 | 43 | 10 | 3 years ago | 27 | June 24, 2020 | 30 | JavaScript | ||
more than a live-reload server, built for efficient front-end development | ||||||||||
Express | 858 | 5 | 4 years ago | April 18, 2016 | 14 | other | Swift | |||
Swift Express is a simple, yet unopinionated web application server written in Swift | ||||||||||
3ree | 854 | 5 years ago | 6 | mit | JavaScript | |||||
An example universal JS application written with the 3REE stack, React + Redux + RethinkDB + Express. A stack for building apps, front and back end, with just Javascript. |
This Project is Planning to Archive ...
Although puer is still very easy to use in a simple development, There is no doubt that it is out of date. After investigating the flaws of Puer and its Competing products (like lite-server、browser-sync), our team redesigned a new project named svrx(server-x)
You can read documentation here (中文文档).
The biggest feature is the decentralized plug-in architecture but also very easy to use. Happy to use it !
Puer - more than a live-reload server , built for efficient frontend development
-i
options-a
addon,the addon is also live reloaded
npm -g install puer
in most cases
cd path/to/your/static/dir
puer
puer will launch the browser for you. all pages will reload when you edit them
To list all of puer's options use puer -h
ubuntu-21:19 ~ $ puer -h
Usage: puer [options...]
Options:
-p,--port <port> server's listen port, 8000 default
-f,--filetype <typelist> fileType to watch(split with '|'), default 'js|css|html|xhtml'
-d,--dir <dir> your customer working dir. default current dir
-i,--inspect start weinre server and debug all puer page
-x,--exclude exclude file under watching(must be a regexp), default: ''
-a,--mock <file> your mock's path
-t,--target <url> remote proxy server
--no-reload close auto-reload feature,(not recommended)
--no-launch close the auto launch feature
--allow-cors allow cross origin resource sharing
-h,--help help list
During development,you may need to mock a request . use -a <addon>
to help you mock a dynamic api
puer -a route.js
a sample route.js
looks like:
// use addon to mock http request
module.exports = {
// GET
"GET /v1/posts/:id": function(req, res, next){
// response json format
res.send({
title: "title changed",
content: "tow post hahahah"
})
},
// PUT POST DELETE is the same
"PUT /v1/posts/:id": function(){
},
"POST /v1/posts": function(){
},
"DELETE /v1/posts/:id": function(){
}
}
It is just a config for routers, you need export an [Object] containing router config. The keys join with 【METHOD】 and 【PATH】, and the values represent the callback。This function is based on express's router, you can check its documentation for more help。
example from above is just equal code in express like:
app.get("/v1/posts/:id", function(req, res, next){
// response json format
res.send({
title: "title changed",
content: "tow post hahahah"
})
})
app.put("/v1/posts/:id", function(){})
app.post("/v1/posts", function(){})
app.delete("/v1/posts/:id", function(){})
Once route.js
is changed, puer will refresh it. There is no need to restart puer.
the route.js style
__Function __ : just like showed before, you can use the express's Response and Request Method
String: if the passin is a [String], puer will find the File first, if file is not exsit, will directly response with the origin [String]
{
"GET /v1/posts/:id": "hello.html"
}
Object | Array: will respone a json format.
{
"GET /v1/posts/:id": {message: "some message"}
"GET /v1/posts": [{message: "some message"}]
}
you can use -t
or --target
to use puer with an exsiting server. For example, say you already have a server running at port 8020.
puer -t http://localhost:8020
【check the record for proxy mode】
You can use 【addon】 with【 target】 for more powerful usage。
puer -t http://localhost:8020 -a route.js
type -i
to bootstrap the weinre, the client script is injected for you in every page through puer, click the 【nav to weinre terminal 】button or find the weinre server directly at port 9001
puer -i
var connect = require("connect")
var path = require("path")
var http = require("http")
var puer = require("puer")
var app = connect()
var server = http.createServer(app)
var options = {
dir: "path/to/watch/folder",
ignored: /(\/|^)\..*|node_modules/ //ignored file
}
app.use(puer.connect(app, server , options)) //use as puer connect middleware
// you must use puer middleware before route and static midleware(before any middle may return 'text/html')
app.use("/", connect.static(__dirname))
server.listen(8001, function(){
console.log("listen on 8001 port")
})
You must use puer middleware before route and static middleware(before any middle may return 'text/html')
puer will inject a namespace puer
in global. it is a Emitter instance. has on
, off
and emit
.
you can register update
event to control the reload logic
puer.on("update", function(ev){
console.log(ev.path) // the absolute path , the file change
console.log(ev.css) // whether css file is change
if(ev.path.match(/\.js$/)){
ev.stop = true; // if you set ev.stop = true. the reload will be stoped;
}
})
Example above means that: if js file is changed, reloading won't be actived.
MIT