Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emmanuelbeziat/emmanuelbeziat-rest
🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files
https://github.com/emmanuelbeziat/emmanuelbeziat-rest
markdown nodejs rest-api
Last synced: 5 days ago
JSON representation
🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files
- Host: GitHub
- URL: https://github.com/emmanuelbeziat/emmanuelbeziat-rest
- Owner: EmmanuelBeziat
- License: mit
- Created: 2017-03-18T00:30:40.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T22:17:48.000Z (2 months ago)
- Last Synced: 2024-09-18T02:55:46.737Z (2 months ago)
- Topics: markdown, nodejs, rest-api
- Language: JavaScript
- Homepage:
- Size: 695 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ![Emmanuel Béziat Logo](public/favicons/favicon-32x32.png) emmanuelbeziat-rest :: Emmanuel Béziat
🎲 A NodeJS App that provide a very simple REST API (just GET) from markdown files.
![Built with](https://img.shields.io/badge/built_with-fastify-blue.svg?style=flat) ![Built With](https://img.shields.io/badge/built_with-nunjucks-green.svg?style=flat
)## What?
- Fetch markdown files, parse it to create a rest API for blogging
- Environment configuration using dotenv## Installation
```bash
# Get the repo
git clone git+ssh://[email protected]/EmmanuelBeziat/emmanuelbeziat-rest.git# Navigate into project folder
cd emmanuelbeziat-rest# Intall dependencies
npm i
```## .env file example
```env
PORT=
HOST=
POSTS=""
CODES=""
PORTFOLIO=""
RSS=""```
## Usage
- **Start the application in development mode:**
```bash
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:**
```bash
npm run prod
```
Runs the application in a production environment, optimized for performance and stability, with nodemon.- **Deploy the application:**
```bash
npm run deploy
```
Deploys the application for production using PM2.- **Run tests:**
```bash
npm run test
```
Run all tests- **Run route tests:**
```bash
npm run test:routes
```
Specifically tests the application's routes to verify that they respond correctly.- **Run environment tests:**
```bash
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.