Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hadyrashwan/golang-for-node-devs
A todo app built using Turso and Go.
https://github.com/hadyrashwan/golang-for-node-devs
golang react sqlite turso
Last synced: about 16 hours ago
JSON representation
A todo app built using Turso and Go.
- Host: GitHub
- URL: https://github.com/hadyrashwan/golang-for-node-devs
- Owner: hadyrashwan
- Created: 2024-08-05T12:55:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-11T16:21:42.000Z (2 months ago)
- Last Synced: 2024-09-17T09:21:05.557Z (2 months ago)
- Topics: golang, react, sqlite, turso
- Language: Go
- Homepage: https://go-react-todo.netlify.app/
- Size: 17.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# To-do App
A to-do app built using Turso and Go.
[![Netlify Status](https://api.netlify.com/api/v1/badges/0a743edc-8c45-49a3-ba9d-922c15554c3c/deploy-status)](https://app.netlify.com/sites/go-react-todo/deploys)[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/hadyrashwan/golang-for-node-devs)
## Demo
Check out the demo of this project [**here**](https://go-terso-todo.techcrafter.online/).## Technologies Used
- Frontend: React, Chakra UI, Vite
- Backend: Turso, Go
## Running Backend TestsTo run the tests for the backend you can run: `go test ./...`
## Environment VariablesThe following environment variables are required for the project to function properly:
- `BACKEND_PORT` The port number on which the backend server will run.
- `DB_URL` The URL of the database used by the project.
- `DB_TOKEN` The token required to authenticate with the database.
- `GO_VERSION` The version of Go used for building the backend.
- `IS_LOCAL` A boolean value indicating whether the project is running locally or not.Make sure to set these environment variables before running the project.
## Running Locally
To run the project locally, follow these steps:
### Backend
1. Create a new file named `.env` in the `backend/api` directory based on `.env.local.example`.
2. Run the following command to start the backend server:
```shell
go run .
```
3. The backend server will start and listen on the port specified by the `BACKEND_PORT` environment variable.### Frontend
1. Create a new file named `.env` in the `client` directory based on `.env.local.example`.
2. Install the project dependencies by running the following command in the `client` directory:
```shell
npm install
```
3. Start the development server by running the following command in the `client` directory:
```shell
npm run dev
```
4. The frontend will start and be accessible at URL mentioned in the console.
## Deploying to NetlifyTo deploy the project to Netlify, follow these steps:
1. Set the environment variables found in backend/api/.env.netlify.example within your Netlify project settings.
2. Set the environment variables from client/.env.netlify.example in your Netlify project settings, adjusting them according to your site's naming conventions.
3. Deploy the project to Netlify.
## API Documentation
For API documentation, please refer to the [Postman documentation](https://www.postman.com/hady-space/workspace/golang-for-node-devs/overview).
## License
This project is licensed under the [MIT License](LICENSE).