To get a local copy up and running follow these simple example steps.
You need to install npm
- npm
npm install npm@latest -g
- Set up a mongodb database on https://www.mongodb.com
- Clone the repo
git clone https://github.com/SamuelCody/auth-app.git
cd
into the project and install NPM packagesnpm install
- Enter your DATABASE_URL and NEXTAUTH_URL in
.env
file in the root directoryDATABASE_URL = "ENTER DATABASE URL"; NEXTAUTH_URL = "http://localhost:3000"; NEXTAUTH_SECRET="a random string";
- Open a terminal and
cd
into the project and create the collections in your database. Using the Prisma CLI tool, run the below in your terminalnpx prisma db push
- Start the project using:
npm run dev