Giter VIP home page Giter VIP logo

todolist-go's Introduction

Welcome to todolist-go

A Go/Revel web application with an AngularJS frontend.

Build and run the application:

docker run --name todolist --network="host" -it debian:latest
apt update && apt-get install -y wget git gcc npm
wget -qO- https://dl.google.com/go/go1.12.9.linux-amd64.tar.gz | tar xzf - -C /opt/
export GOROOT=/opt/go ; export GOPATH=/usr/share/gocode ; export PATH=$GOROOT/bin:$GOPATH/bin:$PATH
go get -v -d github.com/denisacostaq/todolist-go/...
go get -v -u github.com/revel/cmd/revel
cd $GOPATH/src/github.com/denisacostaq/todolist-go/public ; npm i ; npm run copy-libs
revel run github.com/denisacostaq/todolist-go

Please make sure that the db configuration fit your requirements and set an address if you want to access the application from outside localhost.

A tasks list (empty if you have not any yet).

Creating some test data

curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "tests", "priority": 10}' http://localhost:9000/api/v1.0/labels
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "design", "priority": 7}' http://localhost:9000/api/v1.0/labels
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "architecture", "priority": 5}' http://localhost:9000/api/v1.0/labels
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "i18n", "priority": 2}' http://localhost:9000/api/v1.0/labels
curl --request GET --header "Accept: application/json" http://localhost:9000/api/v1.0/labels

curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "task 1", "due_date": "2019-10-28T00:00:00.000Z", "labels": [{"id": 1}]}' http://localhost:9000/api/v1.0/tasks
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "task 2", "due_date": "2019-10-30T00:00:00.000Z", "labels": [{"id": 1}, {"id": 2}]}' http://localhost:9000/api/v1.0/tasks
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "task 3", "due_date": "2019-10-18T00:00:00.000Z", "labels": [{"id": 3}, {"id": 2}]}' http://localhost:9000/api/v1.0/tasks
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "task 4", "due_date": "2019-10-11T00:00:00.000Z", "labels": [{"id": 1}, {"id": 2}, {"id": 4}]}' http://localhost:9000/api/v1.0/tasks
curl --request POST --header "Accept: application/json" --header "Content-Type: application/json" --data '{"name": "task 5", "due_date": "2019-10-12T00:00:00.000Z", "labels": [{"id": 1}]}' http://localhost:9000/api/v1.0/tasks
curl --request GET --header "Accept: application/json" http://localhost:9000/api/v1.0/tasks

Code Layout

The directory structure of the application:

conf/             Configuration directory
    app.conf      Main app configuration file
    routes        Routes definition file

app/              App sources
    init.go       Interceptor registration
    business/     Business service definitions
    models/       Database model definition
    repository/   Data access layer to get data from satabase
    controllers/  App controllers go here
    views/        Templates directory

messages/         Message files

public/           Public static assets
    app/          Angular app

tests/            Test suites (not used yet)

Help

todolist-go's People

Contributors

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