Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
NotificationsYou must be signed in to change notification settings

topcoder-platform/review-api-v6

Repository files navigation

Review API built on modern frameworks for managing all review-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:14# Configure the database connection URL (without schema parameter)export DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/postgres"# Configure the PostgreSQL schema (defaults to 'public' if not specified)export POSTGRES_SCHEMA="public"# 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`

Schema Configuration

The application supports configurable PostgreSQL schemas through thePOSTGRES_SCHEMA environment variable:

# Set the schema for developmentexport POSTGRES_SCHEMA="dev_schema"# Set the schema for productionexport POSTGRES_SCHEMA="prod_schema"# If not specified, the application defaults to the 'public' schema

This allows you to:

  • Use different schemas for different environments (development, testing, production)
  • Isolate data for different instances of the application
  • Improve security by separating schemas based on environment

Data import

  • create a .env filemv .env.sample .env
  • update the postgres database url in .env file —DATABASE_URL="postgresql://postgres:mysecretpassword@localhost:5432/postgres"
  • set the PostgreSQL schema in .env file —POSTGRES_SCHEMA="public" (or your preferred schema name)
  • place all the legacy json files in theprisma/Scorecards directory or specify it in .env file —DATA_DIR=/path/to/Scorecards/folder/
  • install dependenciespnpm install
  • run the prisma migrationnpx prisma migrate dev
  • run the prisma seednpx prisma db seed
  • run the projectpnpm run start

Run tests

# unit tests$ pnpm runtest# e2e tests$ pnpm run test:e2e# test coverage$ pnpm run test:cov

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors8

Languages


[8]ページ先頭

©2009-2025 Movatter.jp