A web application built with Golang, React, TypeScript, and SCSS to display user profiles using styled-components and environment variables.
- Backend: Golang, Gorilla Mux, CORS
- Frontend: React, TypeScript, SCSS, styled-components
- Package manager: Yarn
- Golang (version 1.17 or later)
- Node.js (version 14 or later)
- Yarn (version 1.22 or later)
- Clone the repository:
git clone https://github.com/PunGrumpy/card-profile-go
cd card-profile-go
-
Install dependencies:
- Frontend:
yarn install
- Backend:
cd backend go mod download
-
Run the application:
- Frontend:
yarn start
- Backend:
cd backend go run main.go
The application will be available at http://localhost:3000
. and the backend will be available at http://localhost:8000
.
Create a .env
file in the backend
directory with the following content:
PORT=8000
Replace http://localhost:3000
with the actual origin you want to allow. Replace 8000
with the actual port you want to use.
Create a .env
file in the root directory with the following content:
REACT_APP_API_URL=http://localhost:8000
Replace http://localhost:8000
with the actual URL of the backend API.
- Build the image:
docker compose up --build
- Run the container:
docker compose up -d
- Build the image:
docker build -t card-profile-go .
- Run the container:
docker run -d -p 3000:3000 card-profile-go
This project is licensed under the MIT License. See the LICENSE file for details.