Coder Social home page Coder Social logo

node-backend-developement's Introduction

Backend Learning Repo

This repo contains code examples and files I used while learning backend development.

Node.js

The app.js file contains a basic Express app with the following:

  • Routes for /api/v1/tours and /api/v1/users
  • Connecting to a MongoDB database
  • Controllers for handling user requests

MongoDB

The models/tourModel.js file contains a MongoDB Schema definition for a "Tour" model with the following fields:

  • name
  • rating
  • price

Environment Variables

The config.env file contains environment variables for:

  • Database URL
  • Database password

This is loaded using the dotenv package.

API Documentation

The API has the following routes:

/api/v1/tours

  • GET - Get all tours
  • POST - Create a new tour

/api/v1/users

  • GET - Get all users
  • GET /:id - Get single user
  • PATCH /:id - Update user
  • DELETE /:id - Delete user

The controllers define functions for handling each of these routes.

Frontend

The public folder contains basic HTML/CSS templates for a travel app frontend using:

  • Mapbox GL
  • CSS Grid
  • SVG Icons

This provides an example of how the API could be integrated with a frontend application.

node-backend-developement's People

Contributors

aura-subhadeep avatar

Watchers

 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.