commit 4c5eb8f434971e09694cf6cda74a7f01adcc47be Author: anujsahu Date: Mon Mar 16 20:36:11 2026 +0530 1st diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..93f1361 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d0f84c4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:20-alpine + +WORKDIR /app + +COPY package.json ./ +COPY app.js ./ + +EXPOSE 8080 + +CMD ["node", "app.js"] diff --git a/app.js b/app.js new file mode 100644 index 0000000..ce1f9e7 --- /dev/null +++ b/app.js @@ -0,0 +1,17 @@ +const http = require('http'); + +const PORT = 8080; + +const server = http.createServer((req, res) => { + if (req.method === 'GET' && req.url === '/') { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('1st updateee Hello World'); + } else { + res.writeHead(404, { 'Content-Type': 'text/plain' }); + res.end('Not Found'); + } +}); + +server.listen(PORT, () => { + console.log(`Server running on port ${PORT}`); +}); diff --git a/boltic-properties.yaml b/boltic-properties.yaml new file mode 100644 index 0000000..bcecc6f --- /dev/null +++ b/boltic-properties.yaml @@ -0,0 +1,36 @@ +app: "anujbugtest" +serverlessId: "ce200692-ad45-4edd-b63b-f052f7ce51bb" +region: "asia-south1" +handler: "handler.handler" +language: "nodejs/20" + +serverlessConfig: + Name: "anujbugtest" + Description: "" + Runtime: "git" + # Environment variables for your serverless function + # To add env variables, replace {} with key-value pairs like: + # Env: + # API_KEY: "your-api-key" + #TO add port map, replace {} with port map like: + # PortMap: + # - Name: "port" + # Port: "8080" + # Protocol: "http"/"https" + Env: {} + PortMap: {} + Scaling: + AutoStop: false + Min: 1 + Max: 1 + MaxIdleTime: 300 + Resources: + CPU: 0.1 + MemoryMB: 128 + MemoryMaxMB: 128 + Timeout: 60 + Validations: null + +build: + builtin: dockerfile + ignorefile: .gitignore diff --git a/package.json b/package.json new file mode 100644 index 0000000..d61e7e6 --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "hello-world-app", + "version": "1.0.0", + "description": "Simple Node.js Hello World app", + "main": "app.js", + "scripts": { + "start": "node app.js" + } +}