Question

I'm new to derbyjs and I want to know where I can put my client js file in derbyjs ?

Can I place it into the /public/js folder ? or in components folder /ui ?

Thanks :)

Was it helpful?

Solution

If you mean static files (for example bootstrap's css and js files), you often put these into the /public folder - I think they are served from here by default, but it might have been changed.

For further reference you can see https://github.com/codeparty/derby-starter/blob/master/lib/server.js#L47 where a folder is specified for serving static files. Instead of expressApp.use(express.static(options.static)) you could probably use something like expressApp.use(express.static(__dirname + '/yourstaticfolder')) instead.

The ui folder is basically an example of how a component can be included and used in your application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top