Cannot GET EJS route (e.g. /meditations) in NodeJS / Wappler project – SSR route not resolving

I have created a set of EJS templates under /views/pages/ (e.g. meditations.ejs) and defined static routes in my routes.js like so:
app.get('/meditations', (req, res) => {
res.render('pages/meditations', { layout: 'layouts/main' });
});
These are registered in server.js using:
const routes = require('./setup/routes');
routes(app);
But navigating to http://127.0.0.1:3000/meditations gives me Cannot GET /meditations. Other routes (like /) are working.

I have confirmed:
• The file exists: views/pages/meditations.ejs
• The main.ejs layout is in place
• Wappler server is running, and the console shows no errors

I would really appreciate any help debugging what might be preventing the route from resolving.

Not really following what you are trying to do. Routing in Wappler is simple and is handled via the UI, no need to edit server.js etc.

This may help.

Wappler handles all the page and routes creation itself when you are creating the page in the page manager. You will see the route later on in the Routing manager.

So you don't have to code anything, just use the standard Wappler functionality.

You should not edit the files in the lib folder. When you use the UI the routes are stored in app/config/routes.json. The server will read the config file and setup the routes.

The above is enough for 99% of the routes, if you need to do some special route handling or custom middleware then you can create a file in extensions/server_connect/routes, see the following doc at Extending express (NodeJS) - Docs / Wappler Extensibility - Wappler Community.