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.
In order to run the API locally, you either need .NET Core SDK installed or a working Docker setup.
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.
./build.sh
Once the project has been built successfully, run the project using the start.sh
script.
./start.sh
NOTE: Both scripts (
build.sh
andstart.sh
) will use Debug configuration
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.
./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.
./start-docker.sh
# optionally provide a custom port
./start-docker.sh 8081
Different configuration options are enabled using .NET Core Configuration stack.
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.
{
"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
.