GithubHelp home page GithubHelp logo

kryndex / google-cloud-node-todos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlecloudplatform/google-cloud-node-todos

0.0 2.0 0.0 46 KB

TodoMVC backend using gcloud-node

Home Page: http://gcloud-todos.appspot.com

License: Apache License 2.0

JavaScript 100.00%

google-cloud-node-todos's Introduction

google-cloud-node-todos

TodoMVC backend using google-cloud-node.

Build Status

Prerequisites

  1. Create a new cloud project on console.developers.google.com

  2. Enable the Google Cloud Datastore API. For more information about the Cloud Datastore, see here.

  3. Create a new service account and copy the JSON credentials to key.json

  4. Export your project id:

    $ export PROJECT_ID=<project id>

Running

Locally

# Set your default Dataset
$ export DATASET_ID=$PROJECT_ID

# Install the dependencies
$ npm install

# Start the server
$ npm start
# Check that Docker is running
$ boot2docker up
$ $(boot2docker shellinit)

# Build your Docker image
$ docker build -t app .

# Start a new Docker container
$ docker run -e DATASET_ID=$PROJECT_ID -p 8080:8080 app

# Test the app
$ curl -X GET http://$(boot2docker ip):8080
# Get gcloud
$ curl https://sdk.cloud.google.com | bash

# Authorize gcloud and set your default project
$ gcloud auth login
$ gcloud config set project $PROJECT_ID

# Get App Engine component
$ gcloud components update app

# Check that Docker is running
$ boot2docker up
$ $(boot2docker shellinit)

# Download the Node.js Docker image
$ docker pull google/nodejs-runtime

# Run the app locally
$ gcloud preview app run app.yaml
$ curl -X GET http://localhost:8080

# Deploy the app to production
$ gcloud preview app deploy app.yaml
$ curl -X GET http://$PROJECT_ID.appspot.com

Resources

google-cloud-node-todos's People

Contributors

proppy avatar s3ththompson avatar ryanseys avatar stephenplusplus avatar callmehiphop avatar eloone avatar ktintc 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.