Giter VIP home page Giter VIP logo

daily-diary's Introduction

Daily Diary

Daily Diary is a RESTful backend server implemented in Golang using Clean Architecture by Uncle Bob. It helps the user to organize, preserve and track their daily activities, experiences, thoughts and feelings.

Getting Started

The following instructions will help you to get a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Make sure you have MySQL and Redis with ReJSON installed on your local machine.
  • You can download MySQL from here and Redis from here.
  • If you're using Windows, you need to have Docker installed on your local machine in order to run Redis With ReJSON. Paste the following on the command line to install Redis with ReJSON.
docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest

Installing

  • To clone this repository, you need to have GIT installed on your local machine.
  • Paste the following on the command line:
$ git clone https://github.com/sammy9867/daily-diary.git

Deployment

  • After you have cloned the repository, navigate to .env file and enter your MySQL database configurations.
# Mysql
API_SECRET=9867sammy9867 # For JSON Web tokens, can be anything
DB_HOST=127.0.0.1
DB_DRIVER=mysql 
DB_USER=DB_USER_NAME
DB_PASSWORD=DB_USER_PASSWORD
DB_NAME=YOUR_DB
DB_PORT=3306

# Mysql Test
API_SECRET_TEST=9867sammy9867 # For JSON Web tokens, can be anything
DB_HOST_TEST=127.0.0.1
DB_DRIVER_TEST=mysql 
DB_USER_TEST=DB_USER_NAME
DB_PASSWORD_TEST=DB_USER_PASSWORD
DB_NAME_TEST=YOUR_DB_TEST
DB_PORT_TEST=3306
  • Run the diary_db.sql file in your database workbench.
  • Navigate to the folder where main.go resides and enter the following command to run the program:
go run main.go

Running the tests

  • Each repository folder has a test file. We will create a separate database for testing purposes.
  • Run the diary_db_test.sql file in your database workbench.
  • In order to run a particular test, run the following command:
go test --run TestName

Contributing

All pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Author

  • Samuel Menezes

daily-diary's People

Contributors

sammy9867 avatar

Stargazers

 avatar

Watchers

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