Giter VIP home page Giter VIP logo

bangkit-restapi's Introduction

Cloud Computing

Express JS rest-api for D-jahit application

Prequisite

Built with :

  • Node v18 (Express js)
  • MySql RDBMS
  • Google App Engine
  • Google Cloud Storage
  • Google Cloud SQL

How to setup ?

Install the Dependencies

npm install

Start the app in development mode

npm start

Add and configure app.yaml file

runtime: nodejs18

env_variables:
  INSTANCE_UNIX_SOCKET: /cloudsql/{your-sql-instance-connection-name}
  DB_USER: {your-db-user}
  DB_NAME: {your-database-name}
  GCLOUD_STORAGE_BUCKET: {your-bucket}

Deployment

  1. Setup Google App Engine standard environment
  2. Setup Google Cloud SQL Instance, create the database named "d-jahit-db"
  3. Configure App Engine Standard Environment to connect to Google Cloud SQL Instance
  4. Deploy Expressjs rest-api to App Engine
  5. After App Engine Deployment, the schema and data migration will auto migrate

Detailed Google Cloud Documentation

  1. Connect from App Engine standard environment : https://cloud.google.com/sql/docs/mysql/connect-app-engine-standard#node.js
  2. Connect to Cloud SQL : https://cloud.google.com/sql/docs/mysql/connect-instance-cloud-shell

Code Documentation

API

  1. For detailed API documentation, install this vscode extension : https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi
  2. Open api-spec.yaml file and then open preview on your computer, or you can use online swagger editor : https://editor.swagger.io/

For local development

  • Use 'dev-v1' branch

bangkit-restapi's People

Contributors

abyanzhafran 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.