Closed dnohr closed 4 years ago
It is supported, exactly it is main file is CommonJS
See https://unpkg.com/browse/nanoexpress@2.0.1/package.json and auto-build this file https://unpkg.com/browse/nanoexpress@2.0.1/build/nanoexpress.js
Which error do you get when you want use as CommonJS?
You're right, CommonJS is working! I just didn't see any mention of it in the documentation, which is why I asked.
Is serveStatic also part of the CommonJS? I'm getting following error when trying to include it:
Error: Cannot find module 'nanoexpress/cjs/static'
const staticServe = require('nanoexpress/cjs/static');
It's from following example: https://nanoexpress.js.org/routes/static-serve
Thanks.
No, it’s not a part of cjs, it’s my typo in docs. I will fix as soon as i can get time
Hi,
Any reason for not having CommonJS supported in the simple package? I think it would be easier to migrate from express if it's supported.
Thanks.