Skip to content

🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files

License

Notifications You must be signed in to change notification settings

EmmanuelBeziat/emmanuelbeziat-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emmanuel Béziat Logo emmanuelbeziat-rest :: Emmanuel Béziat

🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files.

Built with Built With

What?

  • Fetch markdown files, parse it to create a rest API for blogging
  • Environment configuration using dotenv

Installation

# Get the repo
git clone git+ssh://git@github.com/EmmanuelBeziat/emmanuelbeziat-rest.git

# Navigate into project folder
cd emmanuelbeziat-rest

# Intall dependencies
npm i

.env file example

PORT=<port>
HOST=<host>
POSTS="<folder path>"
CODES="<folder path>"
PORTFOLIO="<folder path>"
RSS="<rss.xml path>"

Usage

  • Start the application in development mode:

    npm run dev

    Launches the application with hot-reloading for development, with changes in real-time with node watch.

  • Start the application in production mode:

    npm run prod

    Runs the application in a production environment, optimized for performance and stability, with nodemon.

  • Deploy the application:

    npm run deploy

    Deploys the application for production using PM2.

  • Run tests:

    npm run test

    Run all tests

  • Run route tests:

    npm run test:routes

    Specifically tests the application's routes to verify that they respond correctly.

  • Run environment tests:

    npm run test:env

    Checks the environment configurations to ensure all necessary variables are set correctly.

License

This project is licensed under the MIT License.

About

🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published