https://github.com/himanshuteotia/notes-automation
Node.js app that creates a .md file in a GitHub repo from markdown content sent via API.
https://github.com/himanshuteotia/notes-automation
github github-automation
Last synced: 10 months ago
JSON representation
Node.js app that creates a .md file in a GitHub repo from markdown content sent via API.
- Host: GitHub
- URL: https://github.com/himanshuteotia/notes-automation
- Owner: himanshuteotia
- Created: 2025-05-04T20:34:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-04T20:59:39.000Z (about 1 year ago)
- Last Synced: 2025-05-04T21:32:00.243Z (about 1 year ago)
- Topics: github, github-automation
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notes Automation
This is a simple Node.js app that creates a `.md` file in a GitHub repo from markdown content sent via API.
## Features
- Send markdown content via API and it will create a file in your GitHub repo
- Custom folder path and file name support
- Secure authentication via GitHub token
## Setup
1. **Clone the repo and install dependencies:**
```bash
git clone
cd notes-automation
npm install
```
2. **Create a .env file:**
```env
GITHUB_TOKEN=your_github_personal_access_token
GITHUB_USERNAME=your_github_username
GITHUB_REPO=notes
```
3. **Start the server:**
```bash
node index.js
```
## API Usage
**POST** `/create-md`
**Body:**
```json
{
"content": "# Hello World\nThis is a test markdown file.",
"folderPath": "notes/2024",
"fileName": "my-note"
}
```
**Curl Example:**
```bash
curl -X POST http://localhost:3000/create-md \
-H "Content-Type: application/json" \
-d '{
"content": "# Hello World\nThis is a test markdown file.",
"folderPath": "notes/2024",
"fileName": "my-note"
}'
```
## Ignore Files
- `.env`
- `node_modules/`
- `logs/`
- `*.log`
## License
MIT