Code Monkey home page Code Monkey logo

maria-goretti-backend's Introduction

Backend Website Lingkungan St. Maria Goretti

This backend is deployed in serverless functions by Vercel. api/ folder contains all of the serverless functions. lib/ folder contains all of the process and also used in debugging.

Prerequisites

  1. Google Cloud Storage Bucket: Bucket used to store blobs in Google Cloud Storage
  2. Google Cloud Service Account: Service account which binds to Google Cloud Storage
  3. (Optional) base64 encoded Service Account JSON key

Initial setup

  1. Install the dependencies
go mod tidy
  1. Create new .env.development file in the root directory
# .env.development
GOOGLE_APPLICATION_CREDENTIALS= # location of service-account.json
GCLOUD_BUCKET= # bucket name
GOOGLE_CREDENTIALS_BASE64= # base64 string encoded of service-account.json file

GOOGLE_CREDENTIALS_BASE64 is mandatory in production. 3. Run the server (development)

go run lib/main.go

In case you want to build the application and run the executable, you might use the following command

go build -o bin/server lib/main.go

./bin/server

References

  1. Google Cloud Storage
  2. Service Account
  3. JSON to Base64 Convert

maria-goretti-backend's People

Contributors

petrusariaa avatar

Watchers

 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.