Skip to content

Commit

Permalink
Adding setup details for app in README
Browse files Browse the repository at this point in the history
  • Loading branch information
avishek-sen-gupta committed Nov 4, 2024
1 parent 0f79df3 commit ed4b3b6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ fileignoreconfig:
checksum: b6fc353386f888011c9cea17dc83da012f4e139fcc4e5c2ee502f81c5e3609eb
- filename: README.md
checksum: 9a1890534ecbc051bc3866d7cec20611f9a9b800eb0f189c270c683d521aa3bd
- filename: README.md
checksum: 6da2c89d18f9096c1547cae26762d8a9ec2d808e80a58c411e3362a69c0779d6
36 changes: 22 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ You can see the current backlog [here](https://github.com/users/avishek-sen-gupt
- [Caveats](#caveats)
- [Known Issues](#known-issues)
- [References](#references)
- [Demo App Setup(WIP)](#demo-app-setup-wip)

## Introduction
Cobol-REKT is a continually evolving, actively maintained collection of capabilities helpful for reverse engineering legacy Cobol code. The following is a representative list of the capabilities currently available:
Expand Down Expand Up @@ -1058,14 +1059,15 @@ This is a list of algorithms written from scratch, for reference or reuse. All o
- UI
- [Draw a Tree Structure With Only CSS](https://entropicthoughts.com/draw-a-tree-structure-with-only-css)

## Demo App Setup
## Demo App Setup (WIP)

You will need the following set up on your local machine.

- SQLite for the database
- Flyway for DB migrations
- NodeJS with ```npm```


### DB setup

- Run ```up-db.sh```. The script assumes that Flyway is present in ```~/code/flyway```, so you will have to modify that.
Expand All @@ -1075,34 +1077,40 @@ You will need the following set up on your local machine.
### Populating Data
- You will need some data to be set up to actually see something in the app. You can run ```BackendPipelineMain``` to do this.

### Run UI app server
Depending upon if you are developing the app or packaging it for production, you can run one of the following steps.

If you are deploying the UI to be served by the API itself, run:
### Deploy app for development

To run the app locally in development mode, go to ```smojol-app/cobol-lekt``` and run ```npm run serve```. This should start the app server (8080 by default).

Then, run ```mvn clean verify -Dmaven.test.skip``` as described in [How to Build](#how-to-build).

Finally, start the API server (starts on port 7070):

```
scripts/build-app.sh
DATABASE_URL=jdbc:sqlite:/path/to/db/file DATABASE_USER="<db_user>" DATABASE_PASSWORD="<db-password>" java -jar smojol-api/target/smojol-api.jar
```

and [start the API server](#start-the-api-server), skipping the rest of this section.
The development server proxies calls to ```api/*``` to ```localhost:7070```, thus bypassing CORS restrictions.

To run the app locally in development mode, go to ```smojol-app/cobol-lekt``` and run ```npm run serve```. This should start the app server (8080 by default).

### Start the API server
### Deploy for production

Run:
If you are deploying the UI to be served by the API itself, run:

```
DATABASE_URL=jdbc:sqlite:/path/to/db/file DATABASE_USER="<db_user>" DATABASE_PASSWORD="<db-password>" java -jar smojol-api/target/smojol-api.jar
scripts/build-all.sh
```

The API server currently starts on port 7070.
Start the API server (starts on port 7070):

```
DATABASE_URL=jdbc:sqlite:/path/to/db/file DATABASE_USER="<db_user>" DATABASE_PASSWORD="<db-password>" java -jar smojol-api/target/smojol-api.jar
```

[TODO]
## Test it out!

### Test it out!
Hit ```localhost:7070```, and you should see the app.

[TODO]

The rest of this file is mostly technical notes for my personal documentation.

Expand Down
2 changes: 1 addition & 1 deletion smojol-app/cobol-lekt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --mode production --target app --no-module",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down

0 comments on commit ed4b3b6

Please sign in to comment.