๐ฌ Example of how-to use RTK Query, Next Redux Wrapper, NextAuth and MongoDB
September 28, 2022 ยท View on GitHub
Use MongoDB to store the data, RTK Query to make requests, Next Redux Wrapper to dispatch action in the server side, NextAuth to authenticate using email and credentials provider
Acknowledgements
- Based in the project of Goalsetter MERN app by Brad Traversy
Environment Variables
To run this project, you will need to add the following environment variables to your .env file
NEXTAUTH_URL example http://localhost:3000
NEXTAUTH_SECRET a random long string, create one using in the terminal openssl rand -base64 32
MONGO_URL a connection string to the MongoDB instance, example mongodb://localhost/admin
You can copy the example .env and edit the values
cp .env.example .env
Run Locally
Clone the project
git clone https://github.com/leosuncin/goal-app.git
Go to the project directory
cd goal-app
Install dependencies
pnpm install
Start the services using Docker Compose
docker-compose up -d
Start the server
pnpm dev
License
Release under the terms of GPL v3