- Start PostgreSQL Database
docker compose -f docker-compose-postgres.yml up -d
- Prepare CoinMarketCap API key
- Go to https://coinmarketcap.com/ And Sign up
- Login and goto https://pro.coinmarketcap.com/account
- Get your
API key
from Overview menu - This will use for fill in
COIN_MARKET_API_KEY
inside.env
file
- Prepare environment file
cp .env.example .env
- Fill PORT for set service serve
- Fill your database secret (use IP address in
DB_HOST
) - Fill your JWT_SECRET for use in JWT authentication
- Fill JWT_EXPIRES_IN for set How long JWT token will expires expiresIn: expressed in seconds or a string describing a time span vercel/ms
- Fill your COIN_MARKET_BASE_URL (look at the document for get API Domain from document)
- Fill your COIN_MARKET_API_KEY
- Start Backend service using docker
docker compose up crypto-port-service -d
- Start Frontend from this repository crypto-portfolio-frontend
- Install Dependencies
npm install
- start Postgres database using docker compose
docker compose -f docker-compose-postgres.yml up -d
- Prepare CoinMarketCap API key
- Goto https://coinmarketcap.com/ And Sign up
- Login goto https://pro.coinmarketcap.com/account
- Get your
API key
from Overview menu - This will use for fill in
COIN_MARKET_API_KEY
inside.env
file
- Prepare environment file
cp .env.example .env
- Fill PORT for set service serve
- Fill your database secret (in this example is good and can use for run locally)
- Fill your JWT_SECRET for use in JWT authentication
- Fill JWT_EXPIRES_IN for set How long JWT token will expires expiresIn: expressed in seconds or a string describing a time span vercel/ms
- Fill your COIN_MARKET_BASE_URL (look at the document for get API Domain from document)
- Fill your COIN_MARKET_API_KEY
- Start local (develop mode)
npm run start:dev
- Start Frontend from this repository crypto-portfolio-frontend
Note:
To fetch new cryptocurrency detail please make request with method POST
to api endpoint /cryptocurrency/fetch-and-store
and attatch user JWT token
in headers name Authorization
and value is Bearer your-jwt-token