GithubHelp home page GithubHelp logo

project-mongo-api's Introduction

Mongo API Project ๐Ÿƒ

This project's main goal was to use MongoDB to build a database to store data, as well as, retrieve that data and use it to produce a RESTful API. Also it should be modelled and manipulated using mongoose.

Planning & What I learned ๐Ÿงฉ

  • The first step of this project was actually to read through MongoDB's documentation, install it and connect it to MongoDB Atlas, so my API could be deployed to Heroku.
  • After everything was up and running I started looking at the data - I chose a different dataset this time so I get used to diffenret data sets - and started planning the possible endpoints. Since we needed to use mongoose to model and manipulate the data, I then went ahead and create the mongoose model and started to build my endpoints with mongoose operators like find(), findOne() and $gte to filter even more my top songs list by the most popular songs.
  • When I started testing my endpoints I encountered some issues related to case sensitive text, as well as, the genres in the dataset were all in the same string, this would make it difficult to get a match unless we would know all the data, so I needed to use Regex for the artist enpoint and genres query.
  • Learned a lot about error handling!

Endpoints ๐Ÿ’ซ

/

Root: Welcome page

/topsongs

Shows all songs in the dataset

/topsongs?genre=:genre

Shows the songs that match totally or partially the searched genre.

/topsongs/most-popular

Shows the top songs with popularity over 90.

/topsongs/:id

Shows a single song based on that song's id parameter.

/topsongs/artists/:artistName

Shows a song by a specific artist that matches totally or partially the artist's name.

Tech โšก๏ธ

  • MongoDB
  • Mongoose
  • Node.js
  • Express

View it live ๐Ÿ”ด

Top Songs API ๐ŸŽถ

project-mongo-api's People

Contributors

sofiavazs avatar emolsz avatar dependabot[bot] avatar idlefingers 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.