2023-03-29 14:30:15 +00:00
|
|
|
Welcome to the OBP API Explorer II
|
2023-01-27 16:18:12 +00:00
|
|
|
=================================
|
|
|
|
|
|
|
|
|
|
# ABOUT
|
|
|
|
|
|
|
|
|
|
This application is used to explore OBP APIs and interact with the data and services in the context of the logged in user.
|
|
|
|
|
|
|
|
|
|
|
2023-04-25 12:58:44 +00:00
|
|
|
|
2023-06-06 07:49:59 +00:00
|
|
|
## Install the Prerequisite Software
|
|
|
|
|
* required: { node: `>=16.14` }
|
|
|
|
|
* required: { npm: `>=8.0.0` }
|
|
|
|
|
|
|
|
|
|
### Development Project Setup
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-04-25 12:58:44 +00:00
|
|
|
* Setup your .env (see .env.example)
|
2023-05-05 07:09:16 +00:00
|
|
|
|
|
|
|
|
##### Install dependencies
|
2023-04-25 12:58:44 +00:00
|
|
|
|
2023-03-29 15:22:33 +00:00
|
|
|
```sh
|
2023-04-25 12:58:44 +00:00
|
|
|
yarn install
|
2023-03-29 15:22:33 +00:00
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
or
|
|
|
|
|
```sh
|
|
|
|
|
npm install
|
|
|
|
|
```
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-05-05 07:09:16 +00:00
|
|
|
##### Compile and Hot-Reload for Development
|
2023-03-29 15:22:33 +00:00
|
|
|
|
|
|
|
|
```sh
|
2023-04-25 12:58:44 +00:00
|
|
|
yarn dev
|
2023-03-29 15:22:33 +00:00
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
or
|
|
|
|
|
```sh
|
2023-06-05 15:20:28 +00:00
|
|
|
npm run dev
|
2023-05-05 07:09:16 +00:00
|
|
|
```
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-05-05 07:09:16 +00:00
|
|
|
##### ~~Run Unit Tests with [Vitest](https://vitest.dev/)~~
|
|
|
|
|
|
|
|
|
|
<strike>
|
2023-03-29 15:22:33 +00:00
|
|
|
|
|
|
|
|
```sh
|
2023-05-05 07:09:16 +00:00
|
|
|
yarn test:unit
|
2023-03-29 15:22:33 +00:00
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
</strike>
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-05-05 07:09:16 +00:00
|
|
|
or
|
|
|
|
|
<strike>
|
2023-03-29 15:22:33 +00:00
|
|
|
|
|
|
|
|
```sh
|
2023-05-05 07:09:16 +00:00
|
|
|
npm test:unit
|
2023-03-29 15:22:33 +00:00
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
</strike>
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-05-05 07:09:16 +00:00
|
|
|
|
|
|
|
|
##### Lint with [ESLint](https://eslint.org/)
|
2023-03-29 15:22:33 +00:00
|
|
|
|
|
|
|
|
```sh
|
2023-04-25 12:58:44 +00:00
|
|
|
yarn lint
|
2023-03-29 15:22:33 +00:00
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
or
|
|
|
|
|
```sh
|
|
|
|
|
npm lint
|
|
|
|
|
```
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-05-05 07:09:16 +00:00
|
|
|
##### Format with [Prettier](https://prettier.io/)
|
2023-04-25 12:58:44 +00:00
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
yarn format
|
|
|
|
|
```
|
2023-05-05 07:09:16 +00:00
|
|
|
or
|
|
|
|
|
```sh
|
|
|
|
|
npm format
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Compile and Minify for Production
|
|
|
|
|
|
|
|
|
|
##### Build the frontend
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
yarn build
|
|
|
|
|
```
|
|
|
|
|
or
|
|
|
|
|
```sh
|
|
|
|
|
npm build
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
##### Build the backend
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
yarn build-server
|
|
|
|
|
```
|
|
|
|
|
or
|
|
|
|
|
```sh
|
|
|
|
|
npm build-server
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
##### Start the backend server
|
|
|
|
|
```sh
|
|
|
|
|
your-absolute-path-to-server-dist> node app.js
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
##### Nginx deployment
|
|
|
|
|
|
|
|
|
|
```config
|
|
|
|
|
server {
|
|
|
|
|
# Frontend
|
|
|
|
|
location / {
|
|
|
|
|
root /your_absolute_path_to_dist/dist;
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Proxy API
|
|
|
|
|
location /api {
|
|
|
|
|
proxy_pass http://localhost:8085;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
nginx -s reload //Restart your nginx
|
|
|
|
|
```
|
2023-03-29 15:22:33 +00:00
|
|
|
|
2023-01-27 16:18:12 +00:00
|
|
|
|
|
|
|
|
# LICENSE
|
|
|
|
|
|
|
|
|
|
This project is licensed under the AGPL V3 (see NOTICE) and a commercial license from TESOBE.
|
2023-03-29 15:22:33 +00:00
|
|
|
|