rishavnaskar / appointy_task

Task for Appointy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Appointy Task

badge

go-gopher

Requirements

  • Golang SDK. See the Golang SDK installation instructions.
  • An IDE that supports Golang. You can install Android Studio, IntelliJ IDEA, or Visual Studio Code and install the Golang plugins to enable language support and tools for refactoring, running and debugging your backend.

Commands to run

  • To start a local project using Golang
go mod init <project name>
  • To add packages to our project
go get <package name>

Steps to run

Run the following commands to run the project

go build main.go
go run main.go

Disclaimer

I have not used a .env file for the MongoDB Url now for ease of evaluation. I can do the same while working on real life projects.

Routes

  • /users - to get all users (GET)
  • /users - to create a user (POST)
  • /users/{id} - to get an existing user (GET)
  • /posts - to get all posts (GET)
  • /posts - to create a post (POST)
  • /posts/{id} - to get a exisitng post (GET)

Sample Tests

Get an existing user Create a new user
image image



Thank you for reading this!

thank-you-gif-animation

About

Task for Appointy


Languages

Language:Go 100.0%