Code Monkey home page Code Monkey logo

echo-gql-boilerplate's Introduction

Boilerplate

Api base

Getting started

In order to run this API locally, please make sure you have the next dependencies:

go version 1.22 or above

And ensure that the go command is available in the path by running the command:

go version

Then, clone the repository in your GOPATH.

Initial Configuration

To run the API you will need to download the project libraries:

  • go get ./...

Building

In order to build the API, run the next command:

go build

Running the API

To run the API, you need to set the next environment variables:

ENV

Set the environment to run the API. Can have the next values:

  • dev for development environment (by default).
  • prod for production environment.

LOG_LEVEL

Set the log level to print. Will print the value and above. Can have the next values:

  • 0 for debug.
  • 1 for info.
  • 2 for warning (by default).
  • 3 for error.
  • 4 for critical.

One you set the environment variables, you can run the next command in order to start the API:

go run main.go

Or if you compiled the project in the previous step, use the command to run the executable according your operating system.

If you see the next output in the console, the API has been started successfully:

INFO [main] [main] Started <bootstrap> in <dev> environment on port <4001>

API endpoints

This section describes the calls that accepts the API

POST /todo/graphql/

Endpoint example

echo-gql-boilerplate's People

Contributors

street2geek avatar

Watchers

 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.