elisavetTriant / ghibli-movies-api

Sample API built with Node.js, express and mongoose. It connects to MongoDB atlas through a connection string.

Home Page:https://ghibli-sample-api.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unofficial Ghibli YouTube Videos API

Overview

This is a sample API runs in the Node.js environment and it's used as a supplementary asset in this application. It uses the Express.js framework and pulls data from a MongoDB Atlas database.

Features / List of the endpoints

Movies

Utils

Running the project

Available Scripts

Before you can run the app with npm start you should install all depedencies (this means also that you have installed Node.js and npm on your machine. Learn how by reading the docs on downloading and installing Node.js and npm). To begin, navigate on the project directory, after you have downloaded or cloned this repository and run:

npm install

Then, while in the project directory, you can run:

npm run dev

Runs the app.js (where the server logic lives) Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits, as it runs the nodemon task. You will also see any errors in the console.

npm start

Runs the app.js app (where the server logic lives) Open http://localhost:3000 to view it in the browser.

Database setup

  1. In order to connect to your database you need a MongoDB Atlas account. Refer to this documentation on getting started with MongoDB Atlas.
  2. Rename the .env.sample.txt to .env and input the MONGO_URI string to your specific database. Input your own sample data. The schema is already supplied in the source code, in the models/movies.js

Dependencies

App Dependencies

  • cors
  • dotenv
  • express
  • mongoose

Dev Dependencies

  • nodemon

How to get in touch

If you spot any bugs, would like to show me how to make better, or just say hi, contact me at elissavet.me. Thank you!

About

Sample API built with Node.js, express and mongoose. It connects to MongoDB atlas through a connection string.

https://ghibli-sample-api.herokuapp.com/


Languages

Language:JavaScript 57.2%Language:CSS 26.0%Language:HTML 16.8%