{"id":19901241,"url":"https://github.com/vbrazhnik/movie-library-api","last_synced_at":"2026-04-08T23:32:38.879Z","repository":{"id":220985366,"uuid":"168052437","full_name":"VBrazhnik/Movie-Library-API","owner":"VBrazhnik","description":"Movie Library RESTful API [MongoDB + Express.js + Node.js]","archived":false,"fork":false,"pushed_at":"2020-03-16T08:43:45.000Z","size":66,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-08T07:42:50.778Z","etag":null,"topics":["express-js","mongodb","movies-api","moviesdb-api","node-js","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VBrazhnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-01-28T23:03:44.000Z","updated_at":"2020-03-16T08:43:39.000Z","dependencies_parsed_at":"2024-02-05T15:53:16.934Z","dependency_job_id":null,"html_url":"https://github.com/VBrazhnik/Movie-Library-API","commit_stats":null,"previous_names":["vbrazhnik/movie-library-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/VBrazhnik/Movie-Library-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VBrazhnik%2FMovie-Library-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VBrazhnik%2FMovie-Library-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VBrazhnik%2FMovie-Library-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VBrazhnik%2FMovie-Library-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VBrazhnik","download_url":"https://codeload.github.com/VBrazhnik/Movie-Library-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VBrazhnik%2FMovie-Library-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express-js","mongodb","movies-api","moviesdb-api","node-js","restful-api"],"created_at":"2024-11-12T20:14:27.249Z","updated_at":"2026-04-08T23:32:38.848Z","avatar_url":"https://github.com/VBrazhnik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Movie Library RESTful API\n\nThe server supports basic CRUD operations.\n\nMovie Library RESTful API was developed using MongoDB, Express.js and Node.js.\n\n## Installation\n\nClone repository and install node modules:\n\n```\n$ git clone \u003crepository url\u003e \u003cfolder name\u003e\n\n$ cd \u003cfolder name\u003e\n\n$ npm install\n```\n\nModify `.env` file for your environment and then run the following command:\n\n```\n$ npm run start\n```\n\nAlso, you can initiate your database with a few records using the following command:\n\n```\n$ npm run import\n```\n\nBut don't forget to modify it for your environment before execution.\n\nThis command will import data from `movie-library-sample.json` to your MongoDB.\n\n## Movie\n\n### Structure\n\n| Field       | Data Type        | Required     | Restrictions                                 |\n| :---------- | :--------------- | :----------- | :------------------------------------------- |\n| `title`     | String           | Required     | No longer than 100 characters                |\n| `year`      | Number           | Required     | No less than 1800 and no more than 3000      |\n| `directors` | Array of strings | Not required | Each string is no longer than 100 characters |\n| `writers`   | Array of strings | Not required | Each string is no longer than 100 characters |\n| `cast`      | Array of strings | Not required | Each string is no longer than 100 characters |\n\n### Schema\n\n```js\nconst movieSchema = new mongoose.Schema({\n  title: {\n    type: String,\n    maxlength: 100,\n    required: true,\n  },\n  year: {\n    type: Number,\n    min: 1800,\n    max: 3000,\n    required: true,\n  },\n  directors: [\n    {\n      type: String,\n      maxlength: 100,\n    },\n  ],\n  writers: [\n    {\n      type: String,\n      maxlength: 100,\n    },\n  ],\n  cast: [\n    {\n      type: String,\n      maxlength: 100,\n    },\n  ],\n});\n```\n\n### Example\n\n```json\n{\n  \"title\": \"The Girl with Dragon Tattoo\",\n  \"year\": 2011,\n  \"directors\": [\"David Fincher\"],\n  \"writers\": [\"Steven Zaillian\", \"Stieg Larsson\"],\n  \"cast\": [\"Daniel Craig\", \"Rooney Mara\", \"Christopher Plummer\"]\n}\n```\n\n## RESTful API\n\n| URL               | HTTP Method | Body of Request | Response                |\n| :---------------- | :---------- | :-------------- | :---------------------- |\n| `/api/movies`     | `GET`       | —               | All movies              |\n| `/api/movies`     | `POST`      | JSON            | Created movie           |\n| `/api/movies/:id` | `GET`       | —               | Movie with the given ID |\n| `/api/movies/:id` | `PUT`       | JSON            | Updated movie           |\n| `/api/movies/:id` | `DELETE`    | —               | Deleted movie           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbrazhnik%2Fmovie-library-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbrazhnik%2Fmovie-library-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbrazhnik%2Fmovie-library-api/lists"}