Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit ec0db97

Browse files
committed
changing readme.md style
1 parent d77b6ce commit ec0db97

File tree

1 file changed

+54
-13
lines changed

1 file changed

+54
-13
lines changed

media-store/README.md

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,68 @@ It contains these folders and files, following our recommended project layout:
1717
| `readme.md` | this getting started guide |
1818
| `server.js` | initial server set up |
1919

20-
## Start development steps
20+
## Development
2121

22-
- 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
23-
- Run `cds watch`. This will start cds service on 4004 port in watch mode
24-
- Open `app-src` folder and run `npm install` and `npm run watch`. This will install dependencies and run frontend src files watcher. When you will change src files your bundles in app folder will re-compiled. Now you can enjoy development
22+
- At first open a new terminal and run below command. It should create new sqlite source and fill initial data from `db/data`. You can browse database in any sqlite client
2523

26-
#### Better dev experience
24+
```json
25+
npm run deploy
26+
```
2727

28-
- You can use webpack-dev-server to rapid frontend development. Instead of running watcher in `app-src` do `npm run start`. This will start frontend dev server on 3000 port. Now your bundles will be hot reloaded, this means you do not need reload the page to see changes
28+
- Next, start cds service on 4004 port in watch mode:
2929

30-
## Deployment steps
30+
```json
31+
cds watch
32+
```
33+
34+
- Open `app-src` folder and run next commands. This will install dependencies and run frontend src files watcher. When you will change src files your bundles in app directory will re-compiled. Now you can enjoy development:
35+
36+
```json
37+
npm install
38+
npm run watch
39+
```
40+
41+
> For better frontend development experience use below command instead of watcher. This will start frontend dev server on 3000 port. Now your bundles will be hot reloaded, this means you do not need reload the page to see changes:
42+
>
43+
> ```json
44+
> npm run start
45+
> ```
46+
47+
## Deployment
3148
3249
- Make sure you already have hanatrial instance in your cockpit dashboard (SAP Cloud Platform).
3350
Or if you are using hana instance - change it in mta.yaml config file from hanatrial to hana
34-
- Replace `"kind": "sql"` with `"kind": "hana"` in package.json require section
35-
- Run `cf login` for Cloud Foundry authentication
36-
- Open `app-src` folder and run `npm install` if you are haven't done this and `npm run build`. This will create frontend production bundles in app subfolder
37-
- Run `mbt build -t ./`. This will create new build in `*.mtar` file
38-
- Run `cf deploy <.mtar file>` # for example, media-store_1.0.0.mtar
51+
- Change package.json db section
52+
53+
```json
54+
"db": {
55+
"kind": "hana"
56+
}
57+
```
58+
59+
- Authenticate in the Cloud Foundry:
60+
61+
```json
62+
cf login
63+
```
64+
65+
- Open `app-src` folder and run the following commands. This will create frontend production bundles in app subfolder:
66+
67+
```json
68+
npm install
69+
npm run build
70+
```
71+
72+
- From root directory run:
73+
74+
```json
75+
mbt build -t ./
76+
cf deploy media-store_1.0.0.mtar
77+
```
78+
3979
- Now your services should be deployed with hanatrial instance and filled with initial data
4080

4181
## Learn More
4282

43-
Learn more at https://cap.cloud.sap/docs/get-started/.
83+
- [Learn more about CAP](https://cap.cloud.sap/docs/get-started/)
84+
- [Deploying to Cloud Foundry](https://cap.cloud.sap/docs/advanced/deploy-to-cloud)

0 commit comments

Comments
 (0)