#Converting Node.JS Routes to Bun.sh Imports

1 messages · Page 1 of 1 (latest)

marble cloak
#

I am porting over a node.js project. Currently in this project I have a file called "Routes" that sends the express.js instance like so:

const routes = require('./routes.js')(app);

The routes file has a bunch of components instantiated like this:

const testComponent = require('./test-component/test-component-route.js')(app);

How do I convert this over to imports and bun.sh standards?

Thanks!

spiral star
#

This should all still work in Bun

#

There isn't an Express-like API for building API servers built into Bun currently, it's a little more low-level