List steps to configure a database in Sails.js?

devquora
devquora

Posted On: Jun 23, 2021

 

The steps to configure a database in Sails.js are:

  • First, locate the config folder in your root. Then open connections.js
  • Save file
  • Go to your root folder and run the following command: $ npm install sails-mysql --save
  • Now you can use mysql_connection as a connection name in your model config. When you lift your app using the following command: $ sails lift.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Sails.js Interview Questions

    Explain Sails.js?

    Sails.js is an open-source model view controller means the MVC web application framework developed atop the Node. js environment which is designed to make it easy to build custom, enterprise-grade Nod...

    Sails.js Interview Questions

    List some features of Sails.js?

    Some of the features of Sails.js are as follows:Powerful associations. Auto-generate REST APIs. Support WebSockets with no additional code.  Declarative, reusable security policies.  ...

    Sails.js Interview Questions

    How to create an application instance in Sails.js?

    You can create an application instance in Sails.js with the help of the inbuilt application method present in Sail.js....