https://github.com/thorstenhans/fintec-demo-api
FinTec Demo API exposes data from financial domain for demonstration purpose
https://github.com/thorstenhans/fintec-demo-api
netcore2 webapi-core
Last synced: 7 months ago
JSON representation
FinTec Demo API exposes data from financial domain for demonstration purpose
- Host: GitHub
- URL: https://github.com/thorstenhans/fintec-demo-api
- Owner: ThorstenHans
- License: mit
- Created: 2018-11-24T11:46:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-11-12T10:38:47.000Z (over 5 years ago)
- Last Synced: 2025-04-09T16:57:18.682Z (11 months ago)
- Topics: netcore2, webapi-core
- Language: C#
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FinTec Demo API
[](https://dev.azure.com/thns/fintec-demo/_build/latest?definitionId=2)
The _FinTec Demo API_ exposes data from financial domain for demonstration purpose. It has been built using .NET Core and is licensed under [MIT License](./LICENSE).
## Using FinTec Demo API locally
### Dependencies
In order to run the API locally, you either need .NET Core SDK installed or a working Docker setup.
### Running API on bare metal
If you want to run the API directly on your machine, two script in the root folder will assist. First execute the `build.sh` script to restore dependencies and build the API.
```bash
./build.sh
```
Once the project has been built successfully, run the project using the `start.sh` script.
```bash
./start.sh
```
> NOTE: Both scripts (`build.sh` and `start.sh`) will use Debug configuration
### Running API using Docker
If you've a working Docker installation on your system, you can run the _FinTec Demo API_ using a simple docker container.
To build the Docker image, use the `build-docker.sh` script form the project's root folder.
```bash
./build-docker.sh
```
once the image has been built, you can start a new container from the `fintec-demo-api:development-latest` image using the `start-docker.sh` script (also located in projec's root directory).
The `start-docker.sh` will create a new container and bind the exposed container port to port `8080` on your local machine. Either ensure this port is available or pass an alternative port as argument.
```bash
./start-docker.sh
# optionally provide a custom port
./start-docker.sh 8081
```
## Configuration
Different configuration options are enabled using .NET Core Configuration stack.
### CORS
By default _FinTec Demo API_ enables CORS and allows _all origins_, _all headers_ and _all methods_ (due to demonstration purpose). You can customize this behavior by specifying a custom CORS configuration. See the following sample CORS configuration.
```json
{
"cors": {
"disable": false,
"allowAnyHeader": false,
"allowAnyOrigin": false,
"allowAnyMethod": false,
"headers" :
[
"x-api-version"
],
"methods":
[
"GET",
"POST",
"OPTIONS"
],
"origins":
[
"https://localhost:4200"
]
}
}
```
As you can see, you can also `disable` the entire CORS support by setting `disable` to `true`.