api-login-go-mysql

command module
v0.0.0-...-a24f51a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 8 Imported by: 0

README

API-login-go-mysql

login API with bcrypt

How to Run ?

#1.Create The Database with name go_api

#2. Create Table create table with name users

CREATE TABLE `users` ( `id` INT(11) NOT NULL AUTO_INCREMENT , 
`username` VARCHAR(50) NOT NULL , 
`first_name` VARCHAR(200) NOT NULL , 
`last_name` VARCHAR(200) NOT NULL , 
`password` VARCHAR(120) NOT NULL , 
`email`	   VARCHAR(200) NOT null ,
PRIMARY KEY (`id`)) ENGINE = InnoDB;

#run you should import the library first in terminal

go get database/sql

go get golang.org/x/crypto/bcrypt

go get github.com/go-sql-driver/mysql
go get github.com/kataras/go-sessions
And here we go
go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL