🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files.
- Fetch markdown files, parse it to create a rest API for blogging
- Environment configuration using dotenv
# 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
PORT=<port>
HOST=<host>
POSTS="<folder path>"
CODES="<folder path>"
PORTFOLIO="<folder path>"
RSS="<rss.xml path>"
-
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.
This project is licensed under the MIT License.