Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.git
node_modules/
node_modules
database.sqlite3
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,37 @@ To run locally:
* Create database with the name same as in config file
* Run `npm install` or `yarn install`
* Run `sequelize db:migrate`
* Run `sequelize db:seed:all` to feed databases via test datas(seeders)
* Run `sequelize db:seed:undo:all` to remove all test datas
* Run `nodemon` or `npm start`


## Postman test samples

### Get All Students

![Get All Students](./misc/student-api-test.PNG)

### Get All Classrooms

![Get All Classrooms](./misc/classroom-api-test.PNG)

### Get All Lecturers

![Get All Lecturers](./misc/lecturer-api-test.PNG)

### Get Lecturer ById

![Get Lecturer ById](./misc/lecturer-by-id.PNG)

### Create New Lecturer

![Create New Lecturer](./misc/new-lecturer-api.PNG)

### Update A Lecturer

![Update A Lecturer](./misc/update-lecturer-api-test.PNG)

### Delete A Lecturer

![Delete A Lecturer](./misc/delete-lecturer-api.PNG)
25 changes: 0 additions & 25 deletions config/config.js

This file was deleted.

20 changes: 20 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"development": {
"dialect": "sqlite",
"storage": "./database.sqlite3"
},
"test": {
"username": "postgres",
"password": "test",
"database": "test",
"host": "localhost",
"dialect": "postgres"
},
"production": {
"username": "postgres",
"password": "test",
"database": "test",
"host": "localhost",
"dialect": "postgres"
}
}
Binary file added misc/classroom-api-test.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/delete-lecturer-api.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/lecturer-api-test.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/lecturer-by-id.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/new-lecturer-api.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/student-api-test.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added misc/update-lecturer-api-test.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading