Git Product home page Git Product logo

mult-ex's Introduction

Multicolour Example App

Example Multicolour App with Hapi server, Mongo and OAuth.

Getting started

Join the chat https://gitter.im/newworldcode/multicolour

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.

  1. Update the database configuration to your Mongo connection settings in config.js.
  2. Run npm i in the terminal to get the dependencies for the app.
  3. 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.js to enable the module.

Running npm start will start the server up and if your NODE_ENV is "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 config.js.

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.

To learn more about the structure of these schemas, see the Multicolour blueprint documentation or to read about how to add custom routes

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:

  • sails-disk
  • sails-memory
  • sails-redis
  • sails-postgresql
  • sails-mongo
  • sails-mysql
  • sails-arango

Simply update the require("sails-mongo") on line #69 of config.js and update the connection details.

MIT 2016

mult-ex's People

Contributors

davemackintosh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.