mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-12-22 09:50:15 +00:00
help with errors and environment setup
This commit is contained in:
parent
2462eb9686
commit
7b5903c12c
12
README.md
12
README.md
@ -1,5 +1,12 @@
|
||||
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).
|
||||
|
||||
## Setup your environment
|
||||
- Clone the `feat/react-frontend` branch, base folder of the frontend is in `tubearchivist/www`
|
||||
- Copy *.env.local.example* to *.env.local* and set:
|
||||
- **NEXTAUTH_SECRET**: Some long random string
|
||||
- **NEXTAUTH_URL**: Your frontend, most likely `http://localhost:3000`
|
||||
- **NEXT_PUBLIC_TUBEARCHIVIST_URL**: Your Tube Archivist backend testing server, e.g. `http://localhost:8000`
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
@ -10,6 +17,11 @@ npm run dev
|
||||
yarn dev
|
||||
```
|
||||
|
||||
### Errors:
|
||||
- *next command not found*: Install next with `npm install next`
|
||||
- *Error: Invalid src prop [...] hostname [...] is not configured under images in your `next.config.js`*: Add the *NEXT_PUBLIC_TUBEARCHIVIST_URL* to the list of *domains*.
|
||||
- *CORS errors in console*: In your backend in `tubearchivist/config/settings.py` replace the line containing *CORS_ALLOWED_ORIGIN_REGEXES* with `CORS_ORIGIN_ALLOW_ALL = True` and rebuild the container. NEVER do that on network accessible installation.
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
|
||||
|
Loading…
Reference in New Issue
Block a user