Node Express Server with TypeScript and Joi

This repository contains a Node.js Express server implemented in TypeScript, utilizing Joi for validation. It also integrates with the Rick and Morty API for data.

Setup Guide

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/itsyashsahu/nodejs-server.git

Or download the repository manually and extract it.

  1. Navigate to the project directory:
cd nodejs-server
  1. Install dependencies using Yarn:
yarn install

Running the Server Locally

  1. Start the development server:
yarn dev

This command will compile TypeScript files and start the server using nodemon, which will automatically restart the server when changes are detected. 2. You should see output similar to the following:

yarn run v1.22.19
$ nodemon src/index.ts
Listening: http://localhost:5000

This indicates that the server is running locally on port 5000. You can change it by adding the .env files the .env.example is present to help you setup environment variables 3. You can now access the server by visiting http://localhost:5000 in your web browser or using tools like Postman.

This project is deployed on the vercel

Cartoonify API

https://nodejs-server-kappa.vercel.app/

Using the API Once the server is running locally or deployed, you can access the following endpoints:

  • /characters : Returns a list of characters from the Rick and Morty API. ( Pagination Implemented )
  • /characters/:id : Returns details of a specific character by ID.

Go around and explore the API's in the Postman Schema

Postman Schema

https://www.postman.com/lunar-resonance-819866/workspace/side-projects/request/24279670-f4ba7209-6d6d-42b2-9a4f-555fcc97d20b?tab=overview