The purpose of this project was to create a CRUD using GraphQL on the frontend and set up a GraphQL server on the backend. The frontend uses React JS + Typescript with Vite. Vitest was also used for testing. The backend uses node + express as the base for the GraphQL configuration. MongoDB is used as the database and an instance is created through Docker.
The command will build the API developed in Node, will create a MongoDB instance and will build the frontend project developed in React JS with Vite.
docker-compose stop && docker-compose up --build -d --remove-orphans
This is the final result of the services that you should see if everything works as expected.
To access the application you can do it through: http://localhost:5173
To MongoDB database can be accessed through the extension MongoDB for VScode:
The connection string should be for this case mongodb://localhost:27017/
. After we stablish the connection, we should have access to the database:
To execute the tests locally, we need to install the libraries dependencies for the service with npm i
. After that we can run the command:
npm run test
The tests are working with Vitest and Testing Library