Using bootstrap css in Sails.js

2.3k Views Asked by At

I just started learning Sails.js and am trying to make a simple application. I have a <link> tag linking to the bootstrap cdn in my layout.ejs. After certain changes to certain files I get this message.

 excuse my interruption, but it looks like this app
 does not have a project-wide "migrate" setting configured yet.
 (perhaps this is the first time you're lifting it with models?)

 In short, this setting controls whether/how Sails will attempt to automatically
 rebuild the tables/collections/sets/etc. in your database schema.
 You can read more about the "migrate" setting here:
 http://sailsjs.org/#/documentation/concepts/ORM/model-settings.html?q=migrate

 In a production environment (NODE_ENV==="production") Sails always uses
 migrate:"safe" to protect inadvertent deletion of your data.
 However during development, you have a few other options for convenience:

 1. safe  - never auto-migrate my database(s). I will do it myself (by hand)
 2. alter - auto-migrate, but attempt to keep my existing data (experimental)
 3. drop  - wipe/drop ALL my data and rebuild models every time I lift Sails

 What would you like Sails to do?

After choosing any of these it seems, that when I try connecting to the page everything works but my link to bootstrap has been removed and the styling is gone. I'm new to sails, and any kind of backend work so I'm not sure what could be happening.

1

There are 1 best solutions below

0
On BEST ANSWER

The message you have mentioned has nothing to do with the problem.

Sails uses Grunt to merge your JS and CSS file into a single min js and css file when the mode is set to "production" so go to config/local.js and change your settings to 'development'.

To retain your CDN linked css, read how to customize the grunt tasks here:

Grunt Tasks