Skip to content

Commit 8de68f3

Browse files
Init
0 parents  commit 8de68f3

16 files changed

+7314
-0
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Required: Your WebScraping.AI API key
2+
WEBSCRAPING_AI_API_KEY=your_api_key_here
3+
4+
# Optional: Maximum number of concurrent requests (default: 5)
5+
WEBSCRAPING_AI_CONCURRENCY_LIMIT=5

.eslintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/*.test.ts
2+
**/*.test.js
3+
node_modules
4+
dist
5+
jest.setup.ts
6+
jest.config.js

.eslintrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true,
5+
"jest": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"prettier"
10+
],
11+
"parserOptions": {
12+
"ecmaVersion": "latest",
13+
"sourceType": "module"
14+
},
15+
"rules": {
16+
"no-unused-vars": "warn",
17+
"no-console": "off"
18+
}
19+
}

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Lint
30+
run: npm run lint
31+
32+
- name: Test
33+
run: npm test
34+
env:
35+
WEBSCRAPING_AI_API_KEY: ${{ secrets.WEBSCRAPING_AI_API_KEY || 'test-api-key' }}

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependency directories
2+
node_modules/
3+
4+
# Environment variables
5+
.env
6+
.env.local
7+
.env.development.local
8+
.env.test.local
9+
.env.production.local
10+
11+
# Logs
12+
logs
13+
*.log
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage/
20+
21+
# Editor directories and files
22+
.idea/
23+
.vscode/
24+
*.swp
25+
*.swo
26+
27+
# OS specific
28+
.DS_Store
29+
Thumbs.db

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 80,
7+
"endOfLine": "auto"
8+
}

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM node:18-alpine
2+
3+
WORKDIR /app
4+
5+
# Copy package.json and package-lock.json
6+
COPY package*.json ./
7+
8+
# Install only production dependencies
9+
RUN npm ci --only=production
10+
11+
# Copy source files
12+
COPY . .
13+
14+
# Set environment variables
15+
ENV NODE_ENV=production
16+
17+
# Command to run the application
18+
ENTRYPOINT ["node", "src/index.js"]
19+
20+
# Set default arguments
21+
CMD []
22+
23+
# Document that the service uses stdin/stdout for communication
24+
LABEL org.opencontainers.image.description="WebScraping.AI MCP Server - Model Context Protocol server for WebScraping.AI API"
25+
LABEL org.opencontainers.image.source="https://github.com/webscraping-ai/webscraping-ai-mcp-server"
26+
LABEL org.opencontainers.image.licenses="MIT"

0 commit comments

Comments
 (0)