简体   繁体   中英

Where can I put my client file in derbyjs

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 :)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM