Skip to content

Emilianissimo/go-blog-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Getting started (let's GO (_))

Simple pure GO web app.

This program using SQlite3. If you need more - rewrite SQL or connect something like ORM, for example: gorm. Don't forget to download driver.

Tables are auto-migrating via first run.

Everything is inside one file, maybe later I'll refactor it (not).

For Ubuntu 20.04 LTS Focal Fossa (focal):

    sudo snap install go --classic

Run code:

    go run main.go

Or build it:

    go build main.go

If you have troubles with go.mod (you haven't this file lmao and you haven't dependencies (ofc))

Init go.mod file:

    go mod init package_name

Install sql (SQlite3) and some othe packages:

    go mod download github.com/mattn/go-sqlite3
    go get github.com/gorilla/mux # for better router

About

Simple Blog Example written in GO Lang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages