-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.env.example
62 lines (48 loc) · 2.46 KB
/
.env.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Since the ".env" file is gitignored, you can use the ".env.example" file to
# build a new ".env" file when you clone the repo. Keep this file up-to-date
# when you add new variables to `.env`.
# This file will be committed to version control, so make sure not to have any
# secrets in it. If you are cloning this repo, create a copy of this file named
# ".env" and populate it with your secrets.
# When adding additional environment variables, the schema in "/src/env.js"
# should be updated accordingly.
# Example:
# SERVERVAR="foo"
# NEXT_PUBLIC_CLIENTVAR="bar"
NODE_ENV="development" # development, production, test
DATABASE_URL="" # db connection string
AUTH_GITHUB_ID="" # Your github 0Auth ID
AUTH_GITHUB_SECRET="" # Your github 0Auth secret
AUTH_GOOGLE_ID="" # Your google 0Auth ID
AUTH_GOOGLE_SECRET="" # Your google 0Auth secret
AUTH_SECRET="secret" # Your secret for authjs to work
SIGNIN_SINGUP_REDIRECT_URL="/protected" # Redirect URL after signin or signup
SIGNOUT_REDIRECT_URL="/signin" # Redirect URL after signout
AUTH_URL="http://localhost:3000" # Development url or deployed url for authjs
AUTH_TRUST_HOST=true # Trust host if deployed url is trusted for authjs
# ENDPONTS CONSTANTS
AUTH_API_ENDPONT="/api/auth/callback" # Authjs callback endpoint update the middleware if you wanna change this
PROTECTED_API_ENDPOINTS="/api/auth" # Protected endpoints
PUBLIC_API_ENDPOINTS="signin,signup" # Public endpoints
# If you wanna test the applincation with ngrok you can use this command in package.json
"ngrok": "ngrok http --url=<if you have static url from ngrok> --host-header=rewrite <localhost ip>:<port>"
# if you don't have static url from ngrok you can use this command in package.json
"ngrok": "ngrok http --host-header=rewrite <localhost ip>:<port>"
//
script : {
"dev": "next dev",
"build": "next build",
"start": "next start",
"ngrok": "ngrok http --url=<your static url> --host-header=rewrite localhost:3000"
# or
"ngrok": "ngrok http --host-header=rewrite localhost:3000"
}
# if localhost:3000 is not working you can change it ip address of your localhost
//
//
# 0. Create an account on ngrok and get the auth token *need** to run ngrok
# 1. Install ngrok globally according to your OS Linux, Windows, Mac
# 2. cd to your project directory and run the following command
> bun run dev # to start the development server its running on localhost:3000 or any other port
> bun run ngrok # to start the ngrok server
//