A simple Express.js API that provides WaveMaker menu data with filtering capabilities.
- GET endpoint to retrieve menu data
- Filter menu items by excluding a specific ID
- CORS enabled for cross-origin requests
- Ready for deployment on multiple platforms
npm installnpm startThe server will start on http://localhost:3000
GET /api/menu
Response:
{
"success": true,
"count": 7,
"data": [
{
"id": "academy",
"label": "Academy",
"icon": "https://dev-ecosystem.s3.us-east-1.amazonaws.com/marketplace-assets/mxp-asset/icon/acd-icon.svg",
"link": " https://next-academy.wavemaker.com/"
},
...
]
}GET /api/menu?id=academy
Query Parameters:
id(string): The ID of the menu item to exclude from results
Response:
{
"success": true,
"excludedId": "academy",
"count": 6,
"data": [
{
"id": "docs",
"label": "Docs",
"icon": "https://dev-ecosystem.s3.us-east-1.amazonaws.com/marketplace-assets/mxp-asset/icon/wmdocs-icon.svg",
"link": " https://next-docs.wavemaker.com/"
},
...
]
}# Get all menu items
curl http://localhost:3000/api/menu
# Get menu items excluding "academy"
curl http://localhost:3000/api/menu?id=academy
# Get menu items excluding "docs"
curl http://localhost:3000/api/menu?id=docs- Install Vercel CLI:
npm install -g vercel- Deploy:
cd wm-components-api
vercel- Follow the prompts to complete deployment
- Create a new account on Render
- Click "New +" and select "Web Service"
- Connect your GitHub repository or use the "Public Git repository" option
- Configure:
- Build Command:
npm install - Start Command:
npm start
- Build Command:
- Click "Create Web Service"
- Create account on Railway
- Click "New Project"
- Select "Deploy from GitHub repo" or "Deploy from local repo"
- Railway will auto-detect Node.js and deploy
- Install Heroku CLI
- Login:
heroku login- Create Heroku app:
cd wm-components-api
heroku create your-app-name- Deploy:
git init
git add .
git commit -m "Initial commit"
git push heroku mainPORT: The port number for the server (default: 3000)
wm-components-api/
├── server.js # Main Express application
├── package.json # Project dependencies
├── vercel.json # Vercel deployment config
├── render.yaml # Render deployment config
├── .gitignore # Git ignore file
└── README.md # Documentation
- Node.js
- Express.js
- CORS middleware
ISC