Multicolour Example App
Example Multicolour App with Hapi server, Mongo and OAuth.
This example app will connect to your Mongo database server, if you haven't used Mongo before or don't have a server to connect to, please read the Mongo Getting Started documentation to get your own Mongo server up.
If you already have a Mongo server running, following these steps will get your server up and running.
- Update the database configuration to your Mongo connection settings in
npm iin the terminal to get the dependencies for the app.
- To use the auth plugin you'll need a registered app on the service you want to use and to add your configuration to
config.js, also uncomment line #18 in
app.jsto enable the module.
npm start will start the server up and if your
"development" it will automatically seed your database with random data. This seed will happen every time you start the server unless you comment out line #14 in
Once you get the
"Server running at: http://your-server:1811" message you can view the Swagger docs by visiting http://localhost:1811/docs.
Edit and create blueprints in the
content/blueprints to add/edit/remove endpoints from your API.
Read more on the Multicolour wiki
I don't want to use Mongo
You don't have to, Multicolour uses Waterline as it's ORM and you can switch your database tech per environment, per blueprint, however you like. Below is a list of officially supported adapters:
Simply update the
require("sails-mongo") on line #69 of
config.js and update the connection details.