https://github.com/himanshuraj98/express-intersections-api
Line Intersection API - The Line Intersection API is used to find intersecting lines with a given linestring. It accepts a linestring in GeoJSON format and checks for intersections with a set of randomly spread lines.
https://github.com/himanshuraj98/express-intersections-api
api bcrypt body-parser express-server jsonwebtoken morgan nodemon turf-js typescript
Last synced: about 2 months ago
JSON representation
Line Intersection API - The Line Intersection API is used to find intersecting lines with a given linestring. It accepts a linestring in GeoJSON format and checks for intersections with a set of randomly spread lines.
- Host: GitHub
- URL: https://github.com/himanshuraj98/express-intersections-api
- Owner: HimanshuRaj98
- License: mit
- Created: 2023-07-15T17:36:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T17:44:01.000Z (about 2 years ago)
- Last Synced: 2025-06-24T22:40:39.780Z (3 months ago)
- Topics: api, bcrypt, body-parser, express-server, jsonwebtoken, morgan, nodemon, turf-js, typescript
- Language: TypeScript
- Homepage: https://express-intersections-api-production.up.railway.app/
- Size: 3.68 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Express Server README
# Himanshu Raj
# Email : himanshurj85@gmail.com
# Project Assignment For MAPUP.AIThis is the README file for an Express server application. The server is built using Node.js and utilizes the Express framework to handle HTTP requests. It includes various middleware, routes, and custom contexts.
## Table of Contents
- [Dependencies](#dependencies)
- [Getting Started](#getting-started)
- [Middleware](#middleware)
- [Routes](#routes)
- [Starting the Server](#starting-the-server)## Deployed Server Link :
- www.s.id/mapup
- Use Above Link To Test The Api Using Postman## Dependencies
The following dependencies are used in this project:
- Express: Fast, unopinionated web framework for Node.js
- body-parser: Node.js body parsing middleware
- dotenv: Loads environment variables from a .env file
- morgan: HTTP request logger middleware
- jsonwebtoken: JSON Web Token implementation for token verificationMake sure to install these dependencies before running the server.
## Getting Started
1. Clone the repository to your local machine.
2. Put Secrect Key In .env file In JWT_SECRET Variable.
3. Install the required dependencies using a package manager like npm or yarn.
4. Use command (`npm install -dev`)
5. Set up the environment variables by creating a .env file and providing the necessary values.
6. Run the server using the appropriate command (`npx ts-node dist/index.js`).## Middleware
The server uses the following middleware:
- `body-parser`: Parses JSON and URL-encoded request bodies with a payload size limit of 50mb.
- `morgan`: Logs HTTP requests in the "combined" format.## Routes
The server defines the following routes:
- `/`: Returns a "Server is Up!" response for the root URL.
- `/api/v1`: Mounts the GeoJSONRouter middleware, which handles specific routes related to GeoJSON data.
- `/auth`: Mounts the UserRouter middleware, which handles user authentication routes.## Starting the Server
To start the server, run the appropriate command (e.g., `npx ts-node dist/index.js`) in the project's root directory. The server will listen on the port specified in the environment variables.