Giter Site home page Giter Site logo

moonkite-ou / golang-user-microservice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesmawm/golang-user-microservice

0.0 0.0 0.0 61 KB

Create a micro service for handling user accounts.

License: MIT License

Shell 1.70% Go 96.03% Dockerfile 2.27%

golang-user-microservice's Introduction

golang-user-microservice

Create a micro service for handling user accounts. Written in golang.

Getting started

Minimum requirements:

  • Go 1.15

Enable go modules and go dep integration.

Running the server

go run main.go

Testing the server

In a browser, navigate to:

http://localhost:80/api/ping

You should see:

{"ok":true,"pong":true}

Running with docker

Simply run in the background with a docker-enabled machine:

docker-compose up -d

Again, the ping check with this URL should return a valid JSON response.

http://localhost:80/api/ping

Updating swagger.yml

The APIs here should conform to OpenAPI as much as possible.

  1. In a web browser, go to:

    https://editor.swagger.io

  2. Paste the contents of swagger.yml to the editor.

  3. Make the changes on the editor.

  4. Copy the contents on the editor and paste in swagger.wml.

  5. Commit the new codes and submit a pull request.

Contributing

The goal of this microservice to handle only API calls for user accounts.

The first part involves CRUD operations. (completed)

The second part involves authentication and authorization.

The third part involves integration with external microservices and authenticate over JWT tokens.

Some areas of enhancements for this microservice may be:

  • Using a MySQL/Sqlite3 database for storage. (completed)
  • Enable CORS for cross-domain access over REST calls. (completed)
  • Generating and authenting JWT tokens.
  • Handling refresh tokens, and session timeouts and extension.
  • Production deployment with Docker, with support for environment-level settings. (completed)

golang-user-microservice's People

Contributors

jamesmawm avatar nols1000 avatar karimelazzouni avatar yzwdroid avatar paymin avatar scampiuk avatar minaorangina avatar yeganeh666 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.