n8n-express-microservice-node
v1.0.0
Published
Custom n8n node for dynamic Express.js microservice configuration
Maintainers
Readme
n8n Express Microservice Node
A custom n8n node that allows users to visually configure and deploy Express.js microservices within n8n workflows.
Features
- 🚀 Dynamic Express Server: Create HTTP endpoints on-the-fly
- 🎛️ Visual Configuration: Configure routes, methods, and responses through n8n UI
- 🔧 Port Management: Automatic port availability checking
- 📊 Multiple HTTP Methods: Support for GET, POST, PUT, PATCH, DELETE
- 🔒 Security: Built-in authentication options (Basic Auth, API Key)
- 🔄 n8n Integration: Seamless workflow integration with output mapping
Installation
Clone the repository
git clone <repository-url> cd n8n-express-microservice-nodeInstall dependencies
npm installBuild the project
npm run buildInstall in n8n
- Copy the built node to your n8n custom nodes directory
- Restart n8n to load the new node
Development
Build
npm run buildWatch mode for development
npm run devRun tests
npm testLint code
npm run lintProject Structure
├── nodes/
│ └── ExpressServerNode/
│ ├── ExpressServerNode.node.ts # Main node implementation
│ └── ExpressServerNode.node.json # Node metadata
├── test/ # Test files
├── dist/ # Built files
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This fileUsage
- Add the node to your n8n workflow
- Configure the port where the Express server should run
- Define HTTP methods with their routes and responses
- Activate the workflow to start the Express server
- Make HTTP requests to the configured endpoints
Example Configuration
{
"port": 3001,
"methods": [
{
"name": "/health",
"httpMethod": "GET",
"successCode": 200,
"failureCode": 500,
"contentType": "application/json",
"outputMapping": "{\"status\":\"ok\"}"
}
]
}Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
MIT
