Skip to content

bcarranza/api-realworld

Repository files navigation

Rails Example App

This branch differs from the RealWorld API specs by including limitations to public-created content. We encourage you to use it if you plan to host this app publicly.

Deploy to Heroku

Deploy

Getting started

Clone the repository

run git clone

Install the dependancies

NodeJS required

cd api-realworld
npm install

Download pgAdmin for PostgreSQL

PostgreSQL downloads page

Create a server

run pgAdmin create a server (Object/Create/Server) required fields:

  • name
  • HOST name/address

Connect the created server

create a .env file at the root of the project populate it with the url of your database

DATABASE_URL="postgresql://<username>:<password>@<host_name>:<port>/<database_name>?schema=public"

Run the project locally

run npm run dev

Advanced usage

Prisma

Format the Prisma schema

npm run prisma:format

Migrate the SQL schema

prisma migrate dev --name added_job_title

Update the Prisma Client

npm run prisma:generate

with watch option

npm run prisma:generate:watch

Seed the database

npm run prisma:seed

Launch Prisma Studio

npm run prisma:studio

Reset the database

  • Drop the database
  • Create a new database
  • Apply migrations
  • Seed the database with data
npm run prisma:reset

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages