Coder Social home page Coder Social logo

mian482 / mobiledashboard-storecatalog-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm-bluemix-mobile-services/mobiledashboard-storecatalog-backend

0.0 2.0 0.0 10.33 MB

Bluemix Mobile services integration with API Connect, Cloudant NoSQL DB, and Object Storage for the Mobile Dashboard Store Catalog application

License: Apache License 2.0

JavaScript 7.43% CSS 84.05% HTML 8.52%

mobiledashboard-storecatalog-backend's Introduction

Mobile Backend for Bluemix

IBM Mobile Dashboard Store Catalog Backend

The Store Catalog Mobile Backend uses an API Connect Node.js runtime with the Cloudant NoSQL DB, Object Storage, Mobile Client Access, Push Notifications, and Mobile Analytics services on Bluemix. The template exhibits common architectural design patterns that developers can use to model their backend on Bluemix for mobile applications. This backend has been created to support the new IBM Mobile Dashboard Store Catalog template. It has the the ability to browse a list of products and supports the viewing of images for each item in the product list.

The backend uses the following Bluemix services and runtime:

Runtime

  • API Connect for a single point of REST integration using Loopback with Node.js

Services

  • Cloudant NoSQL DB to hold a list products in a NoSQL database
  • Object Storage to store product images
  • Mobile Client Access for protecting resources using authentication
  • Push Notifications for sending notifications to customers
  • Mobile Analytics for monitoring trends and performance of the application

Note: Currently the Object Storage service is not available in the Sydney, so this template is not operable in that region.

Data architecture

backend architecture

Configuring the Backend

The backend can be easily installed using the bluegen command line tool. This CLI tool logs you into Bluemix and prepares the backend services for use. It automatically provisions the services and populates them with the test data required to get up to speed quickly.

Before you begin

Ensure that you have:

Note: If you have issues installing these packages globally, it is likely an issue with your permissions. See the official npm instructions for how to fix permission issues in their Getting Started.

Create your backend from this template

  1. First, clone this project into your working directory:

    git clone https://github.com/ibm-bluemix-mobile-services/mobiledashboard-storecatalog-backend.git

  2. Run the following command in the root directory of your cloned project. This will create the required services on Bluemix and populate them with the necessary test data:

    bluegen

  3. Navigate to your newly created projects folder.

  4. Upload your API Connect backend to Bluemix by typing these commands:

    cf login [-a API_URL] [-u USERNAME] [-o ORG] [-s SPACE]

    cf push

    After running cf push, you should be able to see the application running on the Bluemix dashboard. Visiting the application route will greet you with a landing page displaying more information about this template and the ability to explore the API.

  5. If you want to configure or extend your backend, you can edit the API configuration locally by running the commands:

    npm install

    apic edit

    Also, typing the command npm start will run the backend locally. (This won't allow you to edit the API configuration.)

  6. Redeploy data to Cloudant NoSQL DB and Object Storage by running this command in your project directory:

    bluegen

Note: At this time, you will have to restart your Bluemix application when you redeploy data to the Cloudant NoSQL DB database. This is because API Connect needs to reconnect to your datasource.

License

This package contains sample code provided in source code form. The samples are licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 and may also view the license in the license file within this package.

mobiledashboard-storecatalog-backend's People

Contributors

jmeis avatar ynunez avatar dimayuga avatar antonaleksandrov avatar

Watchers

James Cloos avatar Mian Murad Ahmad 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.