language-helper-backend

command module
v0.0.0-...-d9a73af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 5 Imported by: 0

README

== Language-Helper

Simple language learning helper backend using `go` and the
`gin framework`.

=== `dewit.sh`

Runs the application without building it.

=== Test with mysql database

To start the mysql test database, provide tables and dummy data to te
test-db.sql. In addition you need to provide the following *ENV*
variables. Place them inside a *.env* file.

[source,sh]
----
MYSQL_DATABASE
MYSQL_USER
MYSQL_PASSWORD
MYSQL_ROOT_PASSWORD
MYSQL_PORT
----

Start the mysql test database with:

[source,sh]
----
docker compose up -d
----

If nothing fails you can test the application with:

[source,sh]
----
./dewit.sh
----

=== *Dockerization*

Build Docker image for go backend - DEV version:

[source,sh]
----
docker build -t langhelp/backend_dev . -f docker/Dockerfile.dev
----

Run tests for go app:

[source,sh]
----
docker run --rm langhelp/backend_dev go test -v ./...
----

TODO: Add database tests

Run docker image:

[source,sh]
----
docker run -d -p 8080:8080 --name go_backend langhelp/backend_dev ./lh_backend
----

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL