/handy-snippets-backend

Handy Snippets - a Golang + GraphQL app for storing and sharing end-to-end encrypted notes online. Using SQLite DB and GraphQL API

Primary LanguageGoMIT LicenseMIT

Logo

Handy Snippets Backend

About The App

Handy Snippets - an app for storing and sharing end-to-end encrypted notes online. Written on Go, SQLite DB and GraphQL API to interact with Handy Snippets Frontend

How to Run

Сlone the repo:

go get github.com/dariasmyr/handy-snippets-backend

Option 1: Run via Command Line

You can run the application directly from the command line. Do not forget to enter your PORT and FRONTEND_URL (for CORS policy) into env variables.

PORT=<your_port> FRONTEND_URL=<your_frontend_url>  go run cmd/server.go 

Option 2: Run via Docker

Run the application using Docker by executing the following command. FO NOT forget to write your env variables in the .env file:

# Launch
$ docker-compose up -d

# Rebuild and launch
$ docker-compose up -d --build

Database workflow

This app uses SQLite database for data size optimisation and embedding.