GithubHelp home page GithubHelp logo

go_ddd_webapp's Introduction

CircleCI

my Golang DDD webapp example

Features

  • GAE/datastore
  • Multiple unique constaints on datastore
  • Layered Architecture
  • No framework library
  • Use negroni to handle HTTP
  • Use goon for autocaching

Boot

% dev_appserver.py config/app.yaml

Request examples

% curl -X POST -d '{"email": "[email protected]", "screen_name": "foo", "age": 17}' http://localhost:8080/users/
{"id":5629499534213120,"email":"[email protected]","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}

% curl http://localhost:8080/users/
[{"id":5629499534213120,"email":"[email protected]","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}]

% curl http://localhost:8080/users/5629499534213120
{"id":5629499534213120,"email":"[email protected]","screen_name":"foo","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:21:07.617449Z"}

% curl -X POST -d '{"email": "[email protected]", "screen_name": "new", "age": 17}' http://localhost:8080/users/
{"error":"Unprocessable Entity"}

% curl -X POST -d '{"email": "[email protected]", "screen_name": "foo", "age": 17}' http://localhost:8080/users/
{"error":"Unprocessable Entity"}

% curl -X PUT -d '{"screen_name": "new"}' http://localhost:8080/users/5629499534213120
{"id":5629499534213120,"email":"[email protected]","screen_name":"new","age":17,"created_at":"2018-04-08T10:21:07.617449Z","updated_at":"2018-04-08T10:22:59.279485Z"}

% curl -X DELETE http://localhost:8080/users/5629499534213120

% curl http://localhost:8080/users/
[]

go_ddd_webapp's People

Contributors

hamakn avatar

Watchers

James Cloos 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.