Giter Club home page Giter Club logo

survey's Introduction

Setting up your environment in under 5 minutes

Make sure you have docker and docker-compose installed on your computer. Then, run docker-compose run --service-ports app /bin/bash.

You'll be presented with a command line with all tools already preinstalled, connected to a test database.

Let's start by setting up the database schema by running ./setup-db. You can run ./db-connect to access the postgres db console.

Once we're done, we can install the dependencies by running dep ensure -v

Congratulations! You're now ready to start developing. Yay!

Meeting the code

The codebase is a stripped down project with only the things you need for developing the feature at hand.

The code is structured into controllers/, models/ and serializers/ directories. Controllers handle the request, serializers are used to convert models to/from what gets transfered over the network and models deal with the database. Framework called BeeGo is used, although not much of your code will touch it.

Testing is of huge importance and lives in the unittest/ directory. The init.go file gets executed everytime the test package gets loaded and sets up BeeGo.

The recommended way of running tests is go test -v ./unittest. If you have followed all of the previous steps correctly, the test should pass. Give it a try!

If you need to run a specific test, then you can run go test -v ./test -run ^TestName$. Note that ^TestName$ is a regular expression - you can just write TestName, but in such case other tests with similar names may get executed as well.

To run the code, you can just run go run main.go and then access it at http://localhost:8080.

Let's get down to work!

Now you should be ready to complete the work at hand. Please check the file TASK.md for details.

survey's People

Watchers

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