kikobeats / svr Goto Github PK
View Code? Open in Web Editor NEWHTTP development server done right
Home Page: https://svr.js.org
License: MIT License
HTTP development server done right
Home Page: https://svr.js.org
License: MIT License
I don't know why, but when the server is listening, if the any error throw from module file, it is not visible at terminal.
I tried a lot of thing (like listen process uncaught exception) but I'm missing something.
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.
[zeit/micro-dev]
store request body after logging
By maxbeatty
This simple API works with micro
but not micro-dev
. I believe it has to do with how the logger is reading the body of the request. Without this change, the request hangs using micro-dev
. By assigning the parsed JSON to the request, express-graphql
can use it later. I understand this is a bit hacky and aimed at express middleware that doesn't take advantage of multiple calls to json
. Is there another way to get micro
and micro-dev
behaving consistently? js const graphqlHTTP = require("express-graphql"); const { buildSchema } = require("graphql"); const jwtAuth = require("micro-jwt-jwks-rsa-auth"); const schema = buildSchema(` type Query { random: Float! } `); const root = { random: () => Math.random() }; const checkJwt = jwtAuth({ jwksRsaConfig: { jwksUri: `https://your-project.auth0.com/.well-known/jwks.json` } }); module.exports = checkJwt(graphqlHTTP({ schema, rootValue: root }));
July 23, 2018 at 07:14AM
via GitHub https://ift.tt/2LFFwJv
[zeit/micro-dev]
Show friendly error if 'micro' peer dependency isn't met
By bbbrrriiiaaannn
I got too excited to use micro-dev
and installed it without regarding the npm WARN
about my unmet micro
peer dependency. The resulting Cannot find module 'micro/lib'
error didn't spark an immediate understanding of the fix. This change validates the availability of micro
, and provides a friendlier error if it's missing. I'd meant to use micro-dev
to simulate Now V2's routing (starting from this comment)—since this was only in a development context I hadn't made a point of installing micro
too. Although my error required a a few willful missteps on my part, my mistakes feel like the sort that other devs getting comfortable with micro-dev
could make.
February 20, 2019 at 10:26PM
via GitHub https://ift.tt/2BGUY5a
[zeit/micro-dev]
allow using micro-dev programmatically
By elnygren
Hi! I wanted to submit an idea I'm using myself with ts-node-dev
in a TypeScript + (Apollo) GraphQL project where I use micro
as my server library. Problem Using a package.json
script such as the following: "start": "ts-node-dev node_modules/.bin/micro-dev -p 4000 src/server.ts",
causes the process to crash on syntax errors etc. With micro
this can be fixed by programmatically using micro: # package.json "start": "ts-node-dev src/server.ts" # server.ts const server = require('micro')(handler) server.listen(PORT)
However, as we all know (https://ift.tt/2L0Cnmi) micro-dev
does not support programmatical usage. While many of the features are CLI specific, some are not. Solution With this PR in place, one can do something like: const PORT = process.env.PORT || 4000 if (process.env.NODE_ENV === 'development') { const microDev = require('micro-dev') microDev({ silent: false, limit: '1mb', host: '::', port: PORT })(handler) } else { const server = require('micro')(handler) server.listen(PORT) }
Comments * you guys might prefer https://ift.tt/2vMi07Y * the message part breaks DRY but we can clean that up if this direction feels correct * we're not really supporting too many micro-dev features * it might make sense to not call .listen
within micro-dev
when using the library like this. It would make this PR simpler and the usage a bit cleaner: const server = require('micro')(handler) if (process.env.NODE_ENV === 'development') { server = require('micro-dev')({ silent: false, limit: '1mb'})(handler) } server.listen(PORT)
It nothing else, this might act as a good reference for other micro & TypeScript users! Cheers :)
August 16, 2018 at 10:28PM
via GitHub https://ift.tt/2L4jaAw
[zeit/micro-dev]
Bump js-yaml from 3.11.0 to 3.13.1
By dependabot[bot]
Bumps js-yaml from 3.11.0 to 3.13.1.
[zeit/micro-dev]
Use npm run
consistently throughout README
By trotzig
I was reading through the README and noticed that one of the command examples uses yarn run
instead of npm run
(like all others examples). Not that I have anything against yarn, but it feels better to be consistent about this throughout the document.
January 8, 2019 at 02:15PM
via GitHub http://bit.ly/2H9RNbA
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
smaller bundle FTW!
[zeit/micro-dev]
Bump lodash.merge from 4.6.1 to 4.6.2
By dependabot[bot]
Bumps lodash.merge from 4.6.1 to 4.6.2.
I noted that using config and providing a yaml file, the hot reloading is not working.
I understand why: YAML files compiled into JSON; when a YAML changed, it will be replace from the memory cache of the process but the script for convert it into JSON need to be run again.
[zeit/micro-dev]
Bump lodash from 4.17.10 to 4.17.15
By dependabot[bot]
Bumps lodash from 4.17.10 to 4.17.15.
Hi,
I'm using svr on one of my project (you can find the repo here).
It works great, but whenever I change any file, I get the debug message « modified index.js » (which is the entry point I guess)
I might investigate this and open a PR
PR opened: #20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.