Skip to content
Open
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
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
# imdb_example
## Run Project
~~~
go run main.go
~~~

## Project uses Mongodb as database
1. Make sure to create database with name __IMDB__
2. Create 2 collections 1 is __user__ with admin user and other collection name is __movies__
~~~
{"username":"admin","password":"admin", "role":"admin"}
~~~
3. Import the imdb.json file to __movies__ collection.


## endpoint description.
1. Get - http://localhost:3032/movies - Available to all
2. Post - http://localhost:3032/movies - requires authorization(bearer) token
3. Delete - http://localhost:3032/movies/{id} - requires authorization(bearer) token
4. Patch - http://localhost:3032/movies/{id} - requires authorization(bearer) token and allows only score and popularity field changes.
5. Post - http://localhost:3032/auth/login
tetttt
ttet