A small ExpressJS server to search movies from http://www.omdbapi.com/
- Search Movie
- Get Detail Movie by IMDB ID
- Get Detail Movie by Movie Title
- Log
Swagger Documentation URL: http://143.198.183.254:3003/api-docs/
Search Demo URL: http://143.198.183.254:3003/api/movie/search?s=rush
Detail Demo URL: http://143.198.183.254:3003/api/movie/detail?i=tt0293564
To run this project, you will need to add the following environment variables to your .env file
MYSQL_ROOT_PASSWORD
MYSQL_USER
MYSQL_PASSWORD
MYSQL_DATABASE
MYSQL_HOST
MYSQL_LOCAL_PORT
MYSQL_DOCKER_PORT
NODE_LOCAL_PORT
NODE_DOCKER_PORT
OMDBAPI_URL
OMDBAPI_APIKEY
Clone the project
git clone https://github.com/NaufalHSyahputra/bibit-nodejs-task.git
Go to the app directory
cd bibit-nodejs-task/app
Install dependencies (optional, only if you want to make changes in code)
npm install
Go back to the project directory
cd ../
Copy .env.example to .env
cp .env.example .env
Configure your .env
Start the docker server
docker-compose up -d
Before running tests, make sure the docker server is already up.
Get Container ID, find node-mysql-app image.
docker ps
To run tests, run the following command
docker exec -it <container_id> npm run test
Server: Node, Express, MysQL, Docker
Answer: otheranswer/nomor1.sql
3. Please refactor the code below to make it more concise, efficient and readable with good logic flow.
Answer: otheranswer/nomor3new.js
Answer: otheranswer/nomor4.js