Application with CRUD functions on lists of countries and cities
Postgres SQL + SQL Shell (psql)
Visual Studio (or similar IDE)
Visual Studio Code (or similar IDE)
ASP .Net Web API Core 3.0
PostgreSQL 12.1
Angular 8.0
Visual Studio:
- Open appsettings.json inside "DrzaveWebAPI" and make sure connection string has the right data according to your postgres credentials, so as right port:
- Build your solution:
Right click on solution and press: Build Solution
- Create database with VS Package Manager Console:
Make sure the "Default Project" is set to: DAL
If built correctly you should see your tables in pgAdmin or psql. - Start Project with IIS Express:
SQL Shell (psql):
- Open psql and log in with your credentials:
- Inside project folder find folder "SQL", copy its path and paste it to psql with "database_creator.sql" file and press ENTER:
(psql should start creating database tables and functions)
(If you are using Linux be sure to change forwardslashes with backslashes and if you have path that contains spaces be sure to put whole path in backticks)
If everything went well now you have populated you database with data.
Visual Studio Code:
- Open VS Code and drag&drop "Angular" folder from project:
- Inside VS Code go to Terminal -> New Terinal, write: "npm install" and hit ENTER:
(Node Package Manager should now install all of the dependent packages) - When done, open "environment.ts" inside environment folder and make sure to match localhost url of your API application:
Right click on "DrzaveWebAPI" inside Visual Studio and select Properties:
- Open terminal inside VS Code and type "ng serve -oo"
- Login or Registration
- Register new user on Registration page and then Login
- Clicking on any country you expand it and see if it contains cities:
- Clicking on blue "edit" button you go to edit-route:
- Clicking on "Cities" text you go to cities-route where you can edit cities likewise:
- Error Page
- Exception logging
Inside "..\DrzaveWebAPI\GlobalErrorHandlingLogs\logs" you can find txt file logs for some basic exceptions:
- HTTP request logging
Inside "..\DrzaveWebAPI\HttpRequestHandlingLogs\logs" you can find JSON file logs for every HTTP request and response:
- JWT Authorization
Inside browsers local storage you can find Json Web Token:
- Password Hashing
User passwords are hashed with PBKDF2 and SHA512 Encryption: