change readme.md. clean up console.logs. add check for exsisting invoices

This commit is contained in:
Dzmitry_Tamashevich@epam.com
2020-11-25 19:16:22 +03:00
committed by Daniel Hutzel
parent fe0562f38b
commit f439119e73
12 changed files with 60 additions and 86 deletions

View File

@@ -4,22 +4,33 @@ Welcome to your new project.
It contains these folders and files, following our recommended project layout:
File or Folder | Purpose
---------|----------
`app/` | Contains already bundled js code from [this repository](https://github.com/Dmitriynj/media-store-front)
`db/` | your domain models and data go here
`srv/` | your service models and code go here
`package.json` | project metadata and configuration
`readme.md` | this getting started guide
| File or Folder | Purpose |
| -------------- | ------------------------------------ |
| `app/` | Contains frontend app on react |
| `db/` | your domain models and data go here |
| `srv/` | your service models and code go here |
| `package.json` | project metadata and configuration |
| `readme.md` | this getting started guide |
## Start development steps
## Next Steps
- At first open a new terminal and run `npm run deploy`. It should create new sqlite source and fill initial data from `db/data`. You can browse database in any sqlite client
- Run `cds watch`. This will start cds service on 4004 port in watch mode
- Open `app` folder and run `npm run start`. This will start frontend dev server on 3000 port. It supports debug in chrome and hot reloading out of the box by create-react-app
- Now all things are done for development
- Open a new terminal and run `cds watch`
- (in VS Code simply choose _**Terminal** > Run Task > cds watch_)
- Start adding content, for example, a [db/schema.cds](db/schema.cds).
- To adjust UI simply clone [this](https://github.com/Dmitriynj/media-store-front) repo. Run `yarn start` for development. When you are done, run `yarn build` and copy all files from '/build' to the '/app' folder of the current repo.
## Deployment steps
- Make sure you already have hanatrial instance in your cockpit dashboard (SAP Cloud Platform).
Or if you are using hana instance - change it in mta.yaml config file from hanatrial to hana
- Replace `"kind": "sql"` with `"kind": "hana"` in package.json require section
- Make sure that current folder does not contain any previous `*.mtar` build file and `gen` folder
If exists - remove it
- Run `cf login` for Cloud Foundry authentication
- Open `app` folder and run `npm run build`. This will start create new production frontend bundles
- Run `mbt build -t ./`. This will create new build in `*.mtar` file
- Run `cf deploy <.mtar file>` # for example, media-store_1.0.0.mtar
- Now your services should be deployed with hanatrial instance and filled with initial data
## Learn More