Skip to content

willianson/poc-vercel-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vercel API Hosting

Project to understand the Vercel hosting service.

About the experience

Surprising, much easier than I expected... The name Vercel made me worried, but deploying a REST app on Vercel's serverless service takes less than 3 minutes. Sign up with your GitHub account, select the repository, and boom... perfect.

When I wrote this POC, I was with two people looking to learn JavaScript and Node.js, so this code was worth teaching them both simultaneously.

-- Willianson Araújo

About the application

This is a simple Node.js API that returns a list of products, allowing filtering by price, category, and name. The API supports multi-query parameters to perform the filtering.

Endpoints

Root API Address: https://poc-vercel-backend.vercel.app/products

Query Params

  • priceLower: (Optional) Filters products with a price lower or equal to the specified value.
  • category: (Optional) Filters products by category.
  • name: (Optional) Filters products by name, allowing partial name matches (case-insensitive).

Examples

Running the Project

Prerequisites

  • Node.js installed.
  • A package manager like npm or yarn installed.

Installation

  1. Clone the repository or copy the source code.
  2. Navigate to the project directory.
  3. Run the following command to install the dependencies:
$ yarn

Starting the Server

To start the server, run:

$ node index.js

The application is running on your http://localhost:3000

About

Node.js API project hosted on Vercel, with filtering options for products by price, category, and name.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published