go-web

command module
v0.0.0-...-5907adb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 7 Imported by: 0

README

go-web

Rename .env.example to .env

Please complete all required field in .env

Please Run this SQL Commands

CREATE TABLE `users` (
	`id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`),
	`google_id` VARCHAR(50) NULL DEFAULT NULL, UNIQUE (`google_id`),
	`email` VARCHAR(50) NOT NULL DEFAULT '', UNIQUE (`email`),
	`first_name` VARCHAR(50) NOT NULL DEFAULT '',
	`last_name` VARCHAR(50) NOT NULL DEFAULT '',
	`password` VARCHAR(255) NOT NULL DEFAULT '',
	`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = InnoDB;

CREATE TABLE `access_token` (
	`id` INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`),
	`user_id` INT NOT NULL, INDEX (`user_id`),
	`token` VARCHAR(255) NOT NULL,
	`expired_at` DATETIME NOT NULL , INDEX (`expired_at`),
	`created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	`updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = InnoDB;

Documentation

Overview

Go-Web A Simple framework for web development using go language With auth, Middleware, session, Flash messages, CSRF, access Logs, error logs Database using MongoDB

Directories

Path Synopsis
controllers
Package Middleware handles an incoming request Users can create new Middleware functions here or create a new file beneath the middleware directory
Package Middleware handles an incoming request Users can create new Middleware functions here or create a new file beneath the middleware directory
Package routers create your routes
Package routers create your routes

Jump to

Keyboard shortcuts

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