All Projects → hellojebus → go-mux-jwt-boilerplate

hellojebus / go-mux-jwt-boilerplate

Licence: MIT License
Golang REST API using MUX, GORM, and JWT for authentication

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go-mux-jwt-boilerplate

NodeExpressCRUD
Node, Express, Mongoose and MongoDB CRUD Web Application
Stars: ✭ 45 (+9.76%)
Mutual labels:  crud
rss2email
Convert RSS feeds to emails
Stars: ✭ 72 (+75.61%)
Mutual labels:  golang-application
pigger
A cross-platform note taking and static blog writing system in golang
Stars: ✭ 16 (-60.98%)
Mutual labels:  golang-application
C-Sharp-Learning-Journey
Some of the projects i made when starting to learn c#, winfroms and wpf
Stars: ✭ 95 (+131.71%)
Mutual labels:  crud
zauth
2FA (Two-Factor Authentication) application for CLI terminal with support to import/export andOTP files.
Stars: ✭ 74 (+80.49%)
Mutual labels:  golang-application
go-evepraisal
the code that powers evepraisal.com
Stars: ✭ 61 (+48.78%)
Mutual labels:  golang-application
AutoSpotting
Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.
Stars: ✭ 2,058 (+4919.51%)
Mutual labels:  golang-application
crud-view
CakePHP: Automated admin backend based on your CRUD configuration
Stars: ✭ 45 (+9.76%)
Mutual labels:  crud
laravel-livewire-ui
Laravel Livewire UI, Auth, & CRUD starter kit.
Stars: ✭ 92 (+124.39%)
Mutual labels:  crud
Vue-3-Advance-CRUD
A Complete Single Page Application using Vue, Vue Router, Bootstrap-Vue, Vuex and all....
Stars: ✭ 41 (+0%)
Mutual labels:  crud
vue-crud-ui
Single file Vue.js script that adds a UI to the PHP-CRUD-API project
Stars: ✭ 47 (+14.63%)
Mutual labels:  crud
angular2-crud-auth-routing
Sample Angular (2.x, 4.x) project with Contacts CRUD + routing + simple authentication
Stars: ✭ 60 (+46.34%)
Mutual labels:  crud
hiroki
create a REST api faster than ever
Stars: ✭ 13 (-68.29%)
Mutual labels:  crud
go-reverse-proxy
Reverse proxy with simple routing configuration and override behaviour
Stars: ✭ 21 (-48.78%)
Mutual labels:  gorilla-mux
Desenvolvimento-Android-do-absoluto-zero-para-iniciantes
Visite meu site e conheça todos os meus cursos 100% on-line.
Stars: ✭ 33 (-19.51%)
Mutual labels:  crud
Morpheus
A Matrix client written in Go-QT
Stars: ✭ 20 (-51.22%)
Mutual labels:  golang-application
geoservices-js
Deprecated - please consider using @esri/arcgis-rest-js
Stars: ✭ 53 (+29.27%)
Mutual labels:  crud
ncg-crud-ngx-md
Angular 4+ Material Design CRUD/Admin app by NinjaCodeGen http://DNAfor.NET
Stars: ✭ 36 (-12.2%)
Mutual labels:  crud
breakglass
A command line tool to provide login credentials from Hashicorp Vault
Stars: ✭ 33 (-19.51%)
Mutual labels:  golang-application
spring-boot-data-jpa-mysql
Spring Boot Rest CRUD API example - Spring Data JPA to interact with MySQL/PostgreSQL database.
Stars: ✭ 89 (+117.07%)
Mutual labels:  crud

GoLang Mux, Gorm, JWT REST API Boilerplate

The purpose of this web app is for me to learn Go REST API Development using Mux (router), Gorm (ORM), JSON Web Tokens (JWT), and Golang development in general. The application is optimized for Heroku deployment using the Go Build Kit and Godep for dependency management.

This is for educational purposes only and probably unsuitable for production

What's included

Basic CRUD routes for user management

  • Show Users GET /users
  • Show User GET /users/{userId}
  • Create User POST /users
  • User Login POST /users/login
  • Delete User DELETE /users/{userId}
  • Update User PUT /users/{userId} * Note only the user can update their own name

Several routes are protected and require JWT tokens, which can be generated using the login route. You will need to create a user by sending a post request to the createUser route.

Configuration

Make sure to copy .env.sample to .env and update all fields (DB fields are important!)

Please note that this is using the MySQL driver, if you prefer to use another driver, update db.go accordingly

Gorm is setup to automigrate the Users table, so it should be plug and play.

Installation

Make sure to have all required external deps. Look at Godeps config file to view them all.

Preferred Method, Live Reloading (optional):

Install Gin go get github.com/codegangsta/gin

Then run: gin run main.go

Otherwise:

To run using Go: go run *.go

To view application in browser: localhost:3000 (gin run) or locahost:YOUR_PORT_ENV (go run)

Todos

[] Detach userHandlers DB functions from http for testing purposes
[] Add User Role to illustrate how relationships work with Gorm

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].