Git Product home page Git Product logo

iotcar's Introduction

How to deploy a Node.js program to Bluemix

  1. First of all, you should have a Bluemix account and a Git account.

  2. Login your account and create a workspace. Click the button on the top right link to scan your profile. Make sure your ‘Region’ is in the US South.

    image

  3. Click the “Create Application” button.

    image

  4. Select “Cloud Foundry App” in the left sidebar. Click “SDK for Node.js”.

    image

  5. Named your app. Your app name will generate the host name automatically.

    image

  6. Click “Create” button in the bottom right. The page will jump to the “Getting Started” page.

    image

  7. Select “Overview” item from the menu on the left. Click the button “Enable” on the right bottom page.

    image

  8. If you are a new user, you will enter a welcome page. Click “Get Started”to jump to next page. Select the agree checkbox and click “Enable”.

    image

    image

  9. Click “Create Toolchain from Template”. Select “Simple Cloud Foundry toolchain” in the next page.

    image

  10. Click on “GitHub” button to Authorize the access to the GitHub, then you'll be navigated to GitHub website.

    image

  11. On the Github, click on "Authorize application" button to grant the access form Bluemix DevOps service.

    image

  12. Type Github password to confirm the operation.

    image

  13. After authorization, select "Fork" as Repository type. Change the source repository URL to "https://github.com/ChristiaL/IOTCar". Click “Create”.

    image

  14. Select the second item “CODE” to explore the code on your git repository.

    image

  15. The code is missing some key code about sending data with socketIO which needs user to fill in. If you are not good at coding, please open the folder “document” to scan and copy the answer to the code.

    image

  1. Open “index.html” under the public folder. Line 39,50,61,72 need to fill in a common method “socket.emit()”. The first parameter declares the data type is “String”. The second parameter defines the data is “w” or ”s” or ”a” or ”d”(up/down/left/right).
![image](https://raw.githubusercontent.com/ChristiaL/IOTCar/master/public/images/11.png)
  1. Open “app.js” in the root directory. Fill in a method in line 35. The first parameter declares the data type is “message”. The second parameter defines the data is the parameter “key” in the callback function.
![image](https://raw.githubusercontent.com/ChristiaL/IOTCar/master/public/images/12.png)
  1. Open “manifest.yml” in the root directory. Change the name and host name to yours.
![image](https://raw.githubusercontent.com/ChristiaL/IOTCar/master/public/images/13.png)
  1. Back to the DevOps page (step 9). Click the third item(DELIVER). Click the start button on the top right in “Build Stage” field. After build success, click the start button on the right in “Deploy Stage”.

    image

  2. The last step, after deploy success, open your bluemix link (yourname.mybluemix.net) to view your new program.

![image](https://raw.githubusercontent.com/ChristiaL/IOTCar/master/public/images/15.png)

###Congratulations! You have successful deploy a node.js program to bluemix!

iotcar's People

Contributors

christial avatar liyiche-ibm avatar hamasn 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.