Skip to content

A server for my lms website, made with Echo, Sqlc, Go, and Dbdiagram.

License

Notifications You must be signed in to change notification settings

mystique09/lms-server

Repository files navigation

LMS Server

Back-end for my LMS Website website.

Warning Website is under development, I need to finish this server first before I refactor the client/frontend.

Built with

Go Postgres

Getting started

LMS server require this binaries to be present in order to run.

Prerequisites

Install required tools if you want to self-host.

  • Go version ^1.19
  • PostgreSQL

Installation

  1. Clone repository
    git clone https://github.com/mystique09/lms-server
  2. Install dependencies
    cd lms-server
    go mod tidy
  3. Copy the app.sample.env to app.env add your environment variables
    cp app.sample.env app.env
    # or
    cat app.sample.env > app.env
  4. Run the server
    PORT=8000 go run cmd/main.go
    # or, if you have cmake/make
    PORT=8000 make run

Development

While developing, you need to install this binaries.

  1. Sqlc, sqlc is used to generate typesafe sql queries. Install sqlc.
  2. golang-migrate for manual migration. Install golang-migrate.
  3. mockgen for code mocks, also used for testing. Install gomock.
  4. Gosec, a go linter for security. Install gosec.
  5. Go-critic, a linter used to critic go code. Install go-critic.
  6. Golangci-lint, powerful golang linter. Install golangci-lint.

To run tests:

	go test -v -cover -coverprofile=coverage.out
	# or
	make test

To run linters:

	gosec -quiet -exclude-generated ./...
	gocritic check -enableAll ./...
	golangci-lint run ./...
	# or
	make lint

Apache License 2.0

About

A server for my lms website, made with Echo, Sqlc, Go, and Dbdiagram.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published