app

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

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

Go to latest
Published: Jan 14, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

README

 ___ ___ ___ 
| .'| . | . |
|__,|  _|  _|
    |_| |_|  simple web-app

Built with Echo and using PostgreSQL for data storage.

Structure

The following is a summary of files and directories within this project structure:

.
|-- .env                    # Provides enviroment variables for docker-compose
|-- LICENSE                 # Contains the terms and conditions
|-- Makefile                # Directives used to build and manage the project
|-- README.md               # Provides information about the contents of the repo
|-- Dockerfile              # Dockerfile of the web application (golang:1.18)
|-- go.mod                  # Dependencies stuff
|-- go.sum                  # Dependencies stuff
|-- main.go                 # Main source code file for the web application
`-- docker-compose.yml      # Directives used to build and manage the containers

Deploy

The project can be easily deployed locally using docker-compose and make:

% make up
# http server started on [::]:1323

To stop the web application, run the following command:

% make down

Config

You can customize the deployment of the web application by modifying the values in the .env file. This file contains environment variables that are passed to the Docker containers when they are started.

Testing

To ensure your web application is working correctly, use tools like curl to access the root route, and check that the response ('DB pong') is as expected:

% curl -X GET http://localhost:1323

Or request healthchecks logs to check the web application's status:

# requires jq utility
% make test

Documentation

Overview

Copyright 2023 Enzo Venturi. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Jump to

Keyboard shortcuts

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