Go app with Gin and SQLite + React typescript with tailwind, which can easily be deployed to Heroku.
Make sure you have Go version 1.17 or newer, the Heroku CLI installed, gcc compiler for SQLite and NodeJS for react.
APPS_MODE
is set to development
.go run .
in your terminal (make sure your terminal in current go project folder) to start backend Go.note: You can change the port in .env
in root folder.
REPEAT=10
APPS_MODE=development
APPS_PORT=11001
cd frontend
(assumption: your terminal in root go project).npm i
or npm install
.npm run start
.note: your frontend is send request to golang backend via proxy, if you change your backend port you need to update the proxy in the frontend package.json
.
{
"proxy": "http://localhost:11001",
}
note: make sure env in root folder have APPS_MODE
is set to production
.
$ heroku create
$ git push heroku main
$ heroku open
or
For more information about using Go on Heroku, see these Dev Center articles: