Code Monkey home page Code Monkey logo

radio-2000-backend's Introduction

BackEnd task for Radio 2000

The API backend for Radio 2000. Created using Node.js with the Express framework. Deployed to the web using Vercel (check it out). Remote database made possible with Firestore.

Tasks:

  • API endpoint for List of radio stations
  • API endpoint for singular radio station
  • API endpoint for obtaining details about a user
  • Support the API with a database
  • Implement the endpoints as either a REST API or a GraphQL API
  • Mechanism or tool available for adding data into the database
  • Introduce a migration tool for managing the database schema
  • Ensure the steps are outlined for how to run the application
  • Provide an openAPI or swaggerhub schema file explaining your API
  • Unit test your application
  • Add documentation
  • Deployed online

Running the application:

Online:

Local:

  • Run node . or node index.js in the directory (Radio-2000-BackEnd folder) using terminal/command.

Using the application:

if running locally, you will see a response in terminal with the address the server is accessible from (default http://localhost:8080/). Click here if you want to use it online without having to run the server. On the landing page you can see the following available endpoints:

  • /getAllStations
  • /getStation/:name
  • /getAllUsers
  • /getUser/:name
  • /setUser

Description of endpoints

  • /getAllStations : Retrieves all station data from Firestore database
  • /getStation/:name : Retrieves single specified station data from Firestore database
  • /getAllStations : Retrieves all user data from Firestore database
  • /getStation/:name : Retrieves single specified user data from Firestore database
  • /setUser : To add data, use a API development tool like POSTMAN to pass data in the body as JSON with the endpoint request, for example: { "name": "tom", "email": "[email protected]" }

Making changes/contributions:

  • No guidlines currently set
  • /setUser can be adapted to add other data, for example stations

Testing:

  • Local server has been tested and working on Windows 10, macOS 12.
  • Vercel deployment tested on Windows (Chrome), macOS 12 (Safari) and iOS 16 (Safari)
  • Unit testing required

Tools used:

  • Node.js: Backend JavaScript server environment.
  • Express: Node web framework for building web applications.
  • Firebase/Firestore: Online database used to store stations and users.
  • Vercel: Deploying the application online.
  • POSTMAN: To test data.

Resources:

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.