Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fedelombar authored Oct 17, 2021
1 parent f28411c commit 3cc6316
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Magic Link Authentication and Route Controls with Supabase and Next.js

## Getting Started
To run this project, To get started with this project, first create a new project in the [Supabase](https://supabase.io/) dashboard

First, run the development server:
Once you've created the project in the Supabase dashboard, continue with the next steps.

```bash
npm run dev
# or
yarn dev
```
## Run either locally or deploy to Vercel

### Deploying to Vercel

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
[![Deploy with Vercel]

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
### Running locally

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
1. Clone this project

```sh
git clone https://github.com/dabit3/supabase-nextjs-auth
```

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
2. Change into the directory and install the dependencies

## Learn More
```sh
cd supabase-nextjs-auth

To learn more about Next.js, take a look at the following resources:
npm install
```

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
3. Create a file named __.env.local__ and update it with the values from your Supabase project:

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
```
NEXT_PUBLIC_SUPABASE_URL=https://app-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-public-api-key
```

## Deploy on Vercel
4. Run the server

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
```sh
npm run dev
```

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

0 comments on commit 3cc6316

Please sign in to comment.