This is a simple CRUD app. Under the hood, it runs on Go as backend, Vue as frontend, and PostgreSQL as database.
- Go 1.18 or above
- Vue 3+
- PostgreSQL 9 or above
- NPM 8 or above
-
General
- Clone the repository from
https://github.com/yogski/fullstack-go-vue
. - Run
cd /fullstack-go-vue
. - The repository contains 2 modules:
backend
andfrontend
. For each module, follow the setup below.
- Clone the repository from
-
Backend
- Run
cd/backend
. - To set up
env
file, runmake env
. Ifmake
command is not available (like in Windows command), simply copy.env.sample
then paste in same directory, then rename it to.env
- Fill required values in
.env
. It is recommended to leaveAPP_PORT
as 5000 for development purpose. - For first time setup, run
go run main.go --migration
. The--migration
flag tells the app to run migration setup only (e.g create necessary PostgreSQL tables and insert seed data from CSV files in/backend/connections
). - Run
go run main.go
to start backend server.
- Run
-
Frontend
- Run
cd /frontend
- Run
npm install
- Run
npm run dev
- Now access the web app from browser and enjoy!
- Run
Still many things to do. This is MVP with plenty of room for improvements
- Use proper ORM using Gorm
- Refactor seeding process