nanoExpress Route Separate

75
September 18, 2021, at 02:40 AM

I want to separate route directory, but i can't and get below error.

rror [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cjs' is not defined by "exports" in /mnt/.../projects/.../nanoexpress/node_modules/nanoexpress/package.json

app.js

const nanoexpress = require('nanoexpress');
var indexRouter     = require('./routes/index');
const app = nanoexpress();
const port = 3333;
app.get('/', (req, res) => {
  res.send('Hello World!')
})
app.use('/testy',indexRouter)
app.listen(port)

routers/inde.js

const nanoexpress = require('nanoexpress/cjs');
const Route = require('nanoexpress/cjs/Route');
const app = nanoexpress();
const testRoute = new Route();
testRoute.get('/route', async () => 'hello');
module.exports.testRoute = testRoute;
READ ALSO
Opengl Android how to Draw Smooth Texture

Opengl Android how to Draw Smooth Texture

I am using Mediacodec and Opengl to encode a series of images into video and also add some animations with glsl, but only I get a video with pixelated images

63
Search by country + display (selected) - Opencart 3.0. Is it feasible?

Search by country + display (selected) - Opencart 3.0. Is it feasible?

Is it possible to do a search by country + display of the selected country (selected) as in the example? Live example https://wwwfarfetch

75
Get feature importance from trained Vertex AI Tabular regression model using Python

Get feature importance from trained Vertex AI Tabular regression model using Python

I am working with models trained using the Tabular automl of Vertex in GCPTraining and batch predictions work fine

57
How to reload a jQuery element when a button is pressed

How to reload a jQuery element when a button is pressed

I have a button that generates a graph (using Chartjs):

49