This is the server app that goes with the basic-next-app repo.
It uses MongoDB and is deployed on Heroku.
Started with ApolloServer tutorial.
deployed to https://varioso.herokuapp.com/ See sandbox at https://varioso-668b109fd65d.herokuapp.com/
Log in using yahoo email account. Use the Atlas project named ReadyLab. ReadyLab contains several collections. Currently, I'm playing around in the one called sample_mflix.
npm run dev
- locally, visit http://localhost:4000/
Push changes:
You can git push heroku
but this repo is on github so better to:
git push
- then
git push heroku
or else visit heroku and click to deploy the main branch.
To see the graphql explorer, run heroku open
To see logs: heroku logs --tail
To see the app in Next on Vercel: https://basic-next-app-alpha.vercel.app/
To change configs, go to varioso/settings and open "Config Vars"
- Be sure the Procfile points to the correct node command (e.g. if you change files to be in a
dist
directory, change the Procfile)
To set this up, I started with a tutorial about MongoDB and Graphql, https://reflectoring.io/tutorial-graphql-apollo-server-nodejs-mongodb/
query ExampleQuery {
students {
firstName
lastName
id
}
}
mutation MyFirstMutation($firstName: String, $lastName: String, $age: Int) {
create(firstName: $firstName, lastName: $lastName, age: $age) {
firstName
lastName
age
id
}
}