Giter Club home page Giter Club logo

golang-aws's Introduction

Golang + Standard Library + JWT + AWS (EC2 and RDS)

This project is a RESTful API built with Golang, using only the Standard Library. The API provides Authentication and Authorization functionalities and is designed to interact with a PostgreSQL database hosted on AWS RDS. The application itself is hosted on an AWS EC2 instance.

Features

  • User Authentication: Secure user signup and login using hashed passwords. bcrypt
  • JWT Authorization: Secure access to protected routes with JSON Web Tokens. golang-jwt
  • RESTful Architecture: Follows RESTful principles.
  • PostgreSQL Integration: Data is persisted in a PostgreSQL database hosted on AWS RDS. pgx driver
  • Deployment on AWS: The API is hosted on an AWS EC2 instance with a connection to an RDS PostgreSQL database.

API Endpoints

Public Routes

  • GET /hello - Hello World!
  • GET /users - Get a list of all users.
  • GET /users/{id} - Get details of a specific user.
  • POST /signup - Sign up a user.
  • POST /login - Authenticate a user and receive a JWT.

Protected Routes

  • GET /users/profile - Get the profile of the user. (Authorization)
  • PUT /users/{id} - Update your user account details. (only can do it to your own user account)
  • DELETE /users/{id} - Delete your user account. (only can do it to your own user account)

Note: All protected routes require a valid JWT token to be passed in the Authorization header.

License

This project is licensed under the MIT License - see the LICENSE file for details.

golang-aws's People

Contributors

999ali999 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.