0

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.

4

1 回答 1

0

您提到的消息与问题无关。

当模式设置为“生产”时,Sails 使用 Grunt 将您的 JS 和 CSS 文件合并为一个最小的 js 和 css 文件,因此请转到config/local.js并将您的设置更改为“开发”。

要保留您的 CDN 链接 css,请在此处阅读如何自定义 grunt 任务:

繁重的任务

于 2014-11-13T07:31:26.110 回答