GithubHelp home page GithubHelp logo

thomassuedbroecker / todo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from florae123/todo

0.0 2.0 0.0 438 KB

Simple Cloud Foundry Sample

License: MIT License

JavaScript 49.94% CSS 2.96% HTML 22.90% Shell 24.20%
cloudfoundry

todo's Introduction

Todo App Tutorial (Customized)

This is a sample application built with a CLEAN stack (CLoudant NoSQL database, Express, Angular and Node.js).

If you are looking for the ORIGINAL step-by-step tutorial, look at this branch.

Todo

This version contains some changes related to autoscaling service. You can watch the german YouTube playlist: https://www.youtube.com/watch?v=bu_7eYvRJmY&list=PLUte4WEyMEjVPJ0mESXM4jgQvYlEmUwCF

Running the app on IBM Cloud

  1. Create a IBM Cloud Account

    Sign up for IBM Cloud, or use an existing account.

  2. Download and install the Cloud-foundry CLI tool

  3. Clone the app to your local environment from your terminal using the following command

git clone https://github.com/thomassuedbroecker/todo.git
  1. cd into this newly created directory

  2. Connect to IBM Cloud in the command line tool and follow the prompts to log in. Note: Optional with -sso

    $  bx login -a https://api.eu-de.bluemix.net
    
  3. Create the Cloudant service in IBM Cloud and bind to Cloud Foundry App

$ bx cf create-service cloudantNoSQLDB Shared todo-cloudant
  1. Push the application to IBM Cloud.
$ bx cf push
  1. Watch the logs of the application in IBM Cloud.
$ bx cf logs todo
  1. Get the number of app instances in IBM Cloud.
$ bx cf apps

And voila! You now have your very own instance of the Todo application running on IBM Cloud. Navigate to the application url, e.g. <application-host>.mybluemix.net to create Todo.

Note: You can change the color of the kill button, with the btn btn-danger btn-lg statement inside the public/index.html in line 67.

Running the app locally

You can run the application locally, connecting to the Cloudant service running in IBM CLoud. To do so you need we will create one file to store the Cloudant credentials. These credentials can be retrieved in the IBM IBM Cloud dashboard.

To run the application locally, you will need:

  1. Copy template.vcap-local.json to vcap-local.json

  2. Edit vcap-local.json and fill in the url of the Cloudant database

  3. In the project directory, run:

$ npm install

This will get all the server-side and client-side (through bower) dependencies for the project.

  1. Start the application
$ npm start

The console output will look like:

Loaded local VCAP { services: { cloudantNoSQLDB: [ [Object] ] } }
Initializing database...
Creating database...
server starting on http://localhost:6020
Setting current database to todos

License

See License.txt for license information.

Credits

Based on scotch-io/node-todo


This is a sample application created for the purpose of demonstration and learning The program is provided as-is with no warranties of any kind, express or implied.

todo's People

Contributors

thomassuedbroecker avatar florae123 avatar

Watchers

James Cloos 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.