Coder Social home page Coder Social logo

headdawnlight / my-movies Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 4.98 MB

A full-stack web development project

Home Page: https://my-movies-headdawnlight.herokuapp.com

License: MIT License

HTML 7.02% JavaScript 72.79% CSS 20.20%
node axios chai express javascript mocha nock react redis supertest-mocha-chai

my-movies's Introduction

my-movies

Movie search application created via OMDb API. Deployed with Heroku.

website link: https://my-movies-headdawnlight.herokuapp.com

Update note dated 19.02.2024

The app was inactive for a long time because Heroku ended its free deploy support. The app was deployed via Render.com, another free deploy service.

Introduction

You can search for any movie whose full name you know with this app. For now, you can only see their posters (except those that do not have a poster in the database). This version has search bar and poster display. Movie list creation, update and deletion features will be added in the next version. In addition, movie information will be detailed.

2022-09-20_15-56-30 2022-09-20_15-56-56

Technology and tools I used while developing this program:

  • Microsoft Visual Studio Code

  • HTML, CSS, JavaScript

  • React.js

    • React.js is a JavaScript library for creating user interfaces.
    • React hooks and context api are used in this project.
  • Node.js

    • Node.js (Node) is an open source development platform for executing JavaScript code server-side.
  • Express.js

    • Fast, unopinionated, minimalist web framework for node.
    • The application uses a Rest API built via express.js as a server.
  • Axios

    • Promise based HTTP client for the browser and node.js
    • AbortController used to cancel axios requests.
    • Debounce time adjusted for axios requests.
  • Mocha

    • Simple, flexible, fun JavaScript test framework for Node.js & The Browser
  • Chai

    • Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.
  • Nock

    • HTTP server mocking and expectations library for Node.js
  • Redis

    • Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker.
    • node-redis is a modern, high performance Redis client for Node.js.
    • In this project, the data fetching speed was increased at least 10 times thanks to redis.
  • DotEnv

    • DotEnv is a lightweight npm package that automatically loads environment variables from a .env file into the process.
    • In this project, OMDb api key and heroku redis url are stored with .env variables.
  • Git

    • Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
  • GitHub

    • GitHub is an internet hosting service for software development and version control using Git.
  • Docker

    • Docker is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers.
    • Docker is a software framework for building, running, and managing containers on servers and the cloud.
    • This project is dockerized on local but heroku dockerize is not yet complete.
  • Heroku

    • Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud.
    • This project was deployed using heroku redis server.

Installation

Update note dated 19.02.2024

The project file structure has been updated for the new deploy service. Installation has been simplified, but dockerization has been suspended for now.

New Folder Structure Installation For Render Deployment

1. Clone the repository

$ git clone https://github.com/headdawnLight/my-movies.git

2. Change directory and install npm packages to get the server and the client up

it is necessary to create a .env file and set the omdb api key and redis url environment variables. local redis url: 'redis://127.0.0.1:6379'

$ cd my-movies
$ echo -e "OMDB_API_KEY='API_KEY'\nREDIS_URL='URL'" > .env
$ npm install
$ npm run build
$ npm start

After the process is completed, server will be listened to and client will be up to at localhost:5000

Old Folder Structure Installation For Heroku Deployment

1. Clone the repository

$ git clone https://github.com/headdawnLight/my-movies.git

2. Change directory and install npm packages to get the server up

it is necessary to create a .env file in the server folder and set the omdb api key and redis url environment variables.

$ cd server
$ echo -e "OMDB_API_KEY='API_KEY'\nREDIS_URL='URL'" > .env
$ npm install
$ node server.js

After the process is completed, server will be listened to at localhost:5000

3. Change directory and install npm packages to get the client up

$ cd ..
$ cd client
$ npm install
$ npm start

After the process is completed, client will be up to at localhost:3000

4. Dockerize the app

To dockerize the application, change "proxy": "http://localhost:5000" to "proxy": "http://server:5000" in the client/package.json file.

$ docker compose up --build

License

MIT License

Copyright (c) 2022 Sertan Işık

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

my-movies's People

Contributors

headdawnlight avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.