added explainations to Dev and Prod usage in README

Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
Kininaru 2021-03-12 11:15:07 +08:00
parent 5e04b8c726
commit 65f01c1a09

View File

@ -47,7 +47,7 @@ Backend | RESTful API backend for Casdoor | Golang + Beego + MySQL | https://git
git clone https://github.com/casbin/casdoor
```
## Run
## Run (Dev Environment)
- Run backend (in port 8000):
@ -71,6 +71,29 @@ Backend | RESTful API backend for Casdoor | Golang + Beego + MySQL | https://git
http://localhost:7001/
## Run (Production Environment)
- build static pages:
```
cd web
## npm
npm run build
## yarn
yarn run build
## back to casdoor directory
cd ..
```
- build and run go code:
```
go build
./casdoor
```
Now, Casdoor is running on port 8000. You can access Casdoor pages directly in your browser, or you can setup a reverse proxy to hold your domain name, SSL, etc.
## Config
- Setup database:
@ -182,4 +205,4 @@ Backend | RESTful API backend for Casdoor | Golang + Beego + MySQL | https://git
export const ShowGithubCorner = true
export const GithubRepo = "https://github.com/casbin/casdoor" //your github repository
```
```