Bot releases are hidden (Show)
micro-serve
binary: c5fafd683e91acd47565806e3c155ccb0994d80aonError
(already deprecated): 5d1befa9b1e3aaa8da3e3f2aa2e23a7a08345ee0PORT
env variable, if available: 7177b594329461805a8bbc602deda28845123800204 No Content
if value is null
: 65dbed8889c5634a237d74ff5e8a6746df76c63basync-to-gen
for micro itself as well: 169fa88e4c97a70238fe7d66c677b4c7efe3b2b8Huge thanks to @timneutkens for his help! 😘
onError
and removes references from README.: bc2ab7f4478d6cefa4b85d743dab42c4438c0e14README.md
: #108built-in error handling
links: #107Huge thanks to @nkzawa, @albinekb, @matheuss, @timneutkens, @mxstbr for their help!
onError
method: https://github.com/zeit/micro/pull/99
!==
instead of !=
: c77a79dPublished by rauchg about 8 years ago
Improve error handling when importing the main entry point of the app. Previously the stack trace was not being shown
Published by rauchg about 8 years ago
Micro 6.0.0 is the most exciting release yet! Smaller, faster and easier to use.
import
and export
. The following examples are valid with Micro 6.0.0:// lambda style
module.exports = () => 'Hello world'
// req, res
module.exports = (req, res) => {
res.end('Hello world');
}
// promises
const request = require('request-promise');
module.exports = () => request('https://google.com');
// async / await
const sleep = require('then-sleep');
module.exports = async () => {
await sleep(500);
return 'I waited 500ms with no callbacks!';
}
# listen on localhost:3000
$ micro index.js
micro
for Node 4 and 5.async-to-gen
by @leebyron. You can continue to use your own transpilation workflows with babel if you want, and micro should handle them just fine! In fact, you could also run async-to-gen
yourself, and micro
won't need any special flags to run your code.babel-runtime
after transpilation, and async-to-gen
's runtime is only 2 lines of extra code per file.micro
again, since all our dependencies are now tiny and fast. No need for micro-cli
and micro-core
. Just micro
.└─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
/Users/rauchg
└── [email protected]
real 0m2.397s
user 0m1.669s
sys 0m0.244s
The core of micro is now contained within the package named "micro". In turn, the command line utility now has its own (this one).
main
as entry point if file isn't passed as argument (#52) [@julianduque]