Skip to content

anton-otroshchenko/next-nest-graphql-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

How to run client

npm i in the client folder to install deps

create .env file and copy the variables from .env.example file to it

npm run dev to start the client

How to run the backend

npm i in the backend folder to install deps

create .env file and copy the variables from .env.example file to it

npm run start:dev to start the backend

create a postgres database and insert its name in .env

to run the migration type npm run migration:run

to create the migration firstly build the project with npm run build then write npm run migration:generate

Versions

Node: 20

Postgres: 16

Deploy

Client: https://next-nest-graphql-test.vercel.app/

Backend: https://next-nest-graphql-test.onrender.com

Db was also deployed on Render

Additional info

Api key is correctly set on deploy therefore you won't get unauthorized error, however it throws an error when the key is incorrect and toast notification will show it, you can provide any key you want in .env as long as it the same both on client and server

Tests on the backend are written in post.resolver.spec.ts

On client in tests folder

Redux was also considered to be used here but found that it will have almost no use, but it could have been easily implemented

Due to the fact the render deploy is free some requests may take some time to respond