GithubHelp home page GithubHelp logo

project-express-api's Introduction

Express API Project

This project is my first backend-project using node.js and Express. The task was to create endpoints using Express for a REST-API using json data, returning both arrays of data and a single item. For the project I used data about books and created an API with the following endpoints:

Path-params:

Query-params:

The process

First I tried to imagine how a user would like to use this data and what kind of data the user would want to find, and based o the existing data, what could I make of it. Then I created endpoints from that. I also used the 'express list endpoints'-package for the user to be able to have an overview of existing endpoints. I used filter, find and slice-methods to get the desired data. I also created error-messages to show to the user when no data was found. It wasn't always so easy to decide if the endpoint should be a query param or a path param.

What I learned

  • How to deploy to Heroku
  • Understanding of what node-js and express is and how to work with them.
  • Knowledge on how to create routes using Express.
  • Better understanding of what a RESTful-API is.
  • Understanding of the process of deciding how to structure an API and deciding which endpoints it should include, based on existing data and desired usage on the front-end.
  • Understanding of the difference between a path-param and a query-param.
  • A better overall understanding of how front-end and back-end depend on each other and what can/should best be done on each end.
  • A better understanding of the backend-capabilities of Javascript.

If I had more time I would like to also build a front-end for this API which uses the data and shows it in a nice way to the user.

View it live

https://hanna-books-api.herokuapp.com/

project-express-api's People

Contributors

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