Batteries included URL Shortener that is designed for speed and scalability.
To run this project, you need to have the following pre-requisites installed:
git clone https://github.com/Samagra-Development/yaus.git
cd yaus
cp sample.env .env
docker-compose -f docker-compose.local.yml up -d
The -d
flag is used to run the containers in the background (detached mode). If you want to see the container logs, you can omit the -d
flag.
Docker Compose will read the docker-compose.local.yml
file and start the defined services.
docker-compose -f docker-compose.local.yml ps
This command will display the status of the containers defined in the docker-compose.local.yml
file.
yarn install
npx prisma migrate dev --schema=apps/api/src/app/prisma/schema.prisma
npx prisma db seed
This command will seed the dummy data.
To start backend app:
npx nx serve api
To start frontend app:
npx nx serve admin
localhost:3333/api
. If this opens swagger ui your setup is correct.
For frontend visit localhost:4200
.To run this project, you need to have the following pre-requisites installed:
git clone https://github.com/Samagra-Development/yaus.git
cd yaus
cp sample.env .env
You'd need to edit few things in the .env
for prod. like for example you'd need to replace localhost
with corresponding container name.
docker-compose -f docker-compose.prod.yml up -d
The -d
flag is used to run the containers in the background (detached mode). If you want to see the container logs, you can omit the -d
flag.
Docker Compose will read the docker-compose.prod.yml
file and start the defined services.
docker-compose -f docker-compose.prod.yml ps
This command will display the status of the containers defined in the docker-compose.prod.yml
file.
docker-compose -f docker-compose.prod.yml exec app bash
npx prisma migrate dev --schema=apps/api/src/app/prisma/schema.prisma
exit
First command will drop you into docker container and second command will run the migration and third will simply pull you out from container.
docker-compose -f docker-compose.local.yml exec app bash
npx prisma db seed
exit
This command will seed the dummy data.
localhost:3333/api
. If this opens swagger ui your setup is correct.It is recommended to develop on Gitpod since everything is coupled with a bunch of dependencies. To start your Gitpod session click on the button below.
The repo is structured as a monorepo using the Nx.
A big thanks to all the contributors who have helped make this project possible!