Coder Social home page Coder Social logo

gofr-moneytracker's Introduction

GoFr Money Tracker

RESTful APIs created for serving a money tracker web application using GoFr.

Setup and Installation

  1. Download and install Go.

  2. Download Docker and set it as a background service.

  3. Start a mysql docker container with the following command: docker run --name gofr-mysql -e MYSQL_ROOT_PASSWORD=root123 -e MYSQL_DATABASE=test_db -p 3306:3306 -d mysql:8.0.30

  4. Connect to the bash of the created terminal: docker exec -it gofr-mysql bash

  5. Create user and record tables with the following schema:

    create table user(email varchar(255) NOT NULL);
    
    create table record(
    id int PRIMARY KEY NOT NULL AUTO_INCREMENT,
    email varchar(255) NOT NULL, date varchar(255) NOT NULL,
    amount DECIMAL(10, 2) NOT NULL,
    description varchar(255)); 
    
  6. Create a file with name .env inside configs folder with the following content:

     APP_NAME=gofr-moneytracker
     HTTP_PORT=8080
     
     DB_HOST=localhost
     DB_USER=root
     DB_PASSWORD=root123
     DB_NAME=test_db
     DB_PORT=3306
     DB_DIALECT=mysql
    
  7. Execute the commands inside our repository's directory in order to install the dependencies and run the project:

    go mod tidy
    
    go run main.go
    

API Reference

You can view and test the APIs using this Postman collection or can import the collection using /ZopSmart.postman_collection.json inside Postman.

gofr-moneytracker's People

Contributors

abhinavvsinhaa 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.