Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 1.91 KB

File metadata and controls

70 lines (54 loc) · 1.91 KB


TimeSwap

Frontend Setup Guide

PrerequisitesInstallation StepsAdditional Commands

Prerequisites

Make sure you have the following installed before proceeding:

Git

Node.js (Latest LTS version recommended)

Installation Steps

Command Line

# Clone this repository
$ git clone https://github.com/tranduckhuy/time-swap/

# Navigate to the frontend directory
$ cd time-swap/frontend

# Install dependencies
$ npm install

Note If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Create a .env file

Inside the frontend folder, create a file named .env and add the following variables:

API_AUTH_BASE_URL='YOUR AUTH API BASE URL GOES HERE'
API_BASE_URL='YOUR API BASE URL GOES HERE'
API_GPT_URL='YOUR API CHAT GPT URL GOES HERE'
AUTH_CLIENT_URL='YOUR DEPLOYED PAGE URL GOES HERE'
CHAT_GPT_KEY='YOUR CHAT GPT API KEY GOES HERE'
CHAT_GPT_ORG_KEY='YOUR CHAT GPT ORGANIZATION KEY GOES HERE'

Note Make sure to replace the placeholder values with your actual configuration.

Start the development server

# Start server
$ npm start

Note This will launch the frontend at http://localhost:4200/ by default.

Additional Commands

  • Build the project for production:
# Build the project
$ npm run build

Now your frontend is up and running! 🚀