v2.1
Changes
- Error Handling
Error logger has been changed to see the error more easily!
ts
export function get(req, res) {
throw new Error('ERROR!');
// res.json({});
}
txt
[10:00:00 PM] ERROR ERROR!
at prext\node_modules\prext\dist\bin.js:9889:21
at Array.forEach (<anonymous>)
at prext\node_modules\prext\dist\bin.js:9868:29
...
txt
[10:00:00 PM] ERROR ERROR!
at Object.f [as get] (prext\node_modules\.prext\error.b6nd1qhh5q4.js:2:481)
at prext\node_modules\prext\dist\bin.js:9893:40
at Array.forEach (<anonymous>)
at prext\node_modules\prext\dist\bin.js:9877:29
...
[10:00:00 PM] [tracer] Error occurred in /pages/error.ts
- routing bug
Previously, core handler did not prioritize pages.
For example:
ts
export function get(req, res) {
res.json({ id: req.params.id });
}
ts
export function get(req, res) {
res.send('Login Page');
}
- Fetch
/user/1
txt
{ id: 1 }
txt
{ id: 1 }
- Fetch
/user/login
txt
Login Page
txt
{ id: 1 }
Now, this bug has been fixed!
- Cache Directory Structure
/pages/ | /middlewares/ | |
---|---|---|
v2.0 | /.prext/ | /.prext/ |
v2.1 | /.prext/pages | /.prext/middlewares |