You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Group API built on modern frameworks for managing all group-related Topcoder needs.
Project setup
$ pnpm install
Compile and run the project
# development$ pnpm run start# watch mode$ pnpm run start:dev# production mode$ pnpm run start:prod
Database
# run postgres in docker, or other approachdocker run -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres:14export DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/group-api?schema=groups"# run migrationnpx prisma migrate dev# seed datanpx prisma db seedornpx prisma migrate reset# if you modify prisma schema, run migration again# and it'll ask# Enter a name for the new migration:# just provide a good migration name, such as#- `add_user_table`#- `update_user_fields`#- `create_posts_table`#- `add_email_to_users`#- `update_foreign_keys`
Data import
create a .env filemv .env.sample .env
update the postgres database url in .env file —DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/group-api?schema=groups"
install dependenciespnpm install
run the prisma migrationnpx prisma migrate dev
run the prisma seednpx prisma db seed
run the projectpnpm run start
Test API
import Postman collection. The files aredoc/Group API.postman_collection.json anddoc/Group.postman_environment.json