Giter VIP home page Giter VIP logo

qsoapi's Introduction

QSO API

This is a RESTful API built with Node.js, Express.js, and MongoDB for managing amateur radio QSO (contact) logs. The API provides endpoints for creating, reading, updating, and deleting QSOs.

Prerequisites

  • Node.js
  • MongoDB

Installation

  1. Clone the repository:
git clone https://github.com/your-repo/qsoAPI.git

Navigate to the project directory:

cd qsoAPI
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory and add the following environment variables:
touch .env

MONGODB_URI= JWT_SECRET= Replace with the connection string for your MongoDB instance, and with a secret key for JWT authentication.

Usage

Development

To start the development server with hot-reloading, run:

npm run dev

The API will be accessible at http://localhost:8080.

Production

To start the production server, run:

npm start

Swagger Documentation

The API is documented using Swagger. To generate the Swagger documentation, run:

npm run swagger

The Swagger documentation will be available at http://localhost:3000/api-docs.

API Endpoints The available endpoints are:

POST /api/qsos: Create a new QSO log GET /api/qsos: Get all QSO logs GET /api/qsos/:id: Get a specific QSO log by ID PUT /api/qsos/:id: Update a QSO log by ID DELETE /api/qsos/:id: Delete a QSO log by ID Refer to the Swagger documentation for detailed information about request and response formats.

Authentication

The API uses JSON Web Tokens (JWT) for authentication. To access protected routes, include a valid JWT in the Authorization header of your requests:

Authorization: Bearer

qsoapi's People

Contributors

cal20014 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.