Full-stack MEAN app with Create, Read, Update & Delete functionality.
http://localhost:3000/graphql
GraphQL can be used to query (GET) and mutate (POST, PUT, DELETE etc.) database records. Records can only be edited from here (i.e. not from the Angular frontend).
Node.js v16 javascript runtime using the Chrome V8 engine
Angular v13 frontend
Apollo v3 GraphQL implementation data graph layer
Apollo Client v3 caching GraphQL client to UI components can fetch data via GraphQL. More documentation here.
Apollo Angular v3 caching GraphQL server. Website
Backend
/backend
run npm i
to install dependenciesbackend/config.json
then add database access credentials - see config.example.json
npm run start
to run the backend in dev. mode. Open http://localhost:3000 to view it in the browser. Restarts itself if code updatedFrontend
/frontend
run npm i
to install dependenciesnpm run start
to run frontend in dev. mode.backend/graphql/resolvers
function to return an array of quotes with id using the map function quotes: async function () {
const quotes = await Quote.find();
return {
quotes: quotes.map((q) => {
return {
...q._doc,
_id: q._id.toString(),
};
}),
};
},
ERROR Error: Http failure response for https://48p1r2roz4.sse.codesandbox.io/: