mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 01:10:42 +08:00
Add ng serve local proxy configuration for api calls
This commit is contained in:
parent
6cc736f623
commit
d4baf71483
4 changed files with 20 additions and 4 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -11,6 +11,10 @@
|
|||
/vendor/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> ng serve ###
|
||||
/proxy.conf.local.json
|
||||
###< ng serve ###
|
||||
|
||||
build/
|
||||
config/
|
||||
!config/.gitkeep
|
||||
|
|
10
README.md
10
README.md
|
@ -44,6 +44,10 @@ find . -type d -exec chmod 0755 {} \;
|
|||
find . -type f -exec chmod 0644 {} \;
|
||||
chmod +x bin/console
|
||||
```
|
||||
5. Run `bin/console orm:schema-tool:update --force`
|
||||
6. Run `npm install`
|
||||
7. Run `ng build`
|
||||
5. Go back to root folder
|
||||
6. Run `bin/console orm:schema-tool:update --force`
|
||||
7. Run `npm install`
|
||||
8. Setup proxy config for `ng serve`
|
||||
- Copy `proxy.conf.env.json` to `proxy.conf.local.json`
|
||||
- Replace `"target": "http//<api_host>:<api_port>"` with your api url
|
||||
9. Run `ng build` or `ng serve`
|
|
@ -60,7 +60,8 @@
|
|||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "SuiteCRM:build:serve"
|
||||
"browserTarget": "SuiteCRM:build:serve",
|
||||
"proxyConfig": "./proxy.conf.local.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
|
|
7
proxy.conf.env.json
Normal file
7
proxy.conf.env.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"/api/*": {
|
||||
"target": "http//<api_host>:<api_port>",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue