diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 3f8d299..0000000 --- a/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "bracketSpacing": true, - "printWidth": 80, - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "all", - "useTabs": false -} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 51e5d98..0000000 --- a/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -# Use the official Node.js 14 image as the base image -FROM node:14 - -# Set the working directory in the container -WORKDIR /app - -# Copy the package.json and package-lock.json files to the container -COPY package*.json ./ - -# Install the dependencies -RUN npm install - -# Copy the rest of the application code to the container -COPY . . - -# Expose the port your application listens on -EXPOSE 3000 - -# Start the application -CMD [ "node", "index.js" ] diff --git a/README.md b/README.md index 823f360..f54f61c 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,4 @@ Great for testing simple deployments to the cloud.----- --- - + testing diff --git a/buildspec.yml b/buildspec.yml deleted file mode 100644 index 7ca194c..0000000 --- a/buildspec.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: 0.2 - -# env: -# parameter-store: -# buildNumber: "/build-number/mycodebuild" - -phases: - pre_build: - commands: - - echo Logging in to Amazon ECR - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com - build: - commands: - - echo Build started on `date` - - echo Building the Docker image. - - echo $CODEBUILD_BUILD_NUMBER - - docker build -t $IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER . - - docker tag $IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER - post_build: - commands: - - echo Build completed on `date` - - echo Pushing the Docker image... - - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$CODEBUILD_BUILD_NUMBER - - diff --git a/deployment.yml b/deployment.yml deleted file mode 100644 index c2d6277..0000000 --- a/deployment.yml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/name: cicd-demo - app.kubernetes.io/instance: cicd-demo-instance - app.kubernetes.io/version: '1.0.0' - app.kubernetes.io/managed-by: kubectl - name: cicd-demo-deployment -spec: - replicas: 1 - selector: - matchLabels: - app: cicd-demo - template: - metadata: - labels: - app: cicd-demo - spec: - containers: - - image: 591802062023.dkr.ecr.us-east-1.amazonaws.com/mywebapprepo:latest - imagePullPolicy: Always - name: cicd-demo - ports: - - containerPort: 3000 - - diff --git a/index.html b/index.html deleted file mode 100644 index 184cba8..0000000 --- a/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - My Beautiful Node.js Web Application - - - -

Welcome to My Beautiful Node.js Web Application ajin abraham

-

This is my first Node.js application created on July 20, 08:5 AM.

- My Image - - diff --git a/index.js b/index.js deleted file mode 100644 index e38b7cc..0000000 --- a/index.js +++ /dev/null @@ -1,30 +0,0 @@ -const http = require('http'); -const fs = require('fs'); -const path = require('path'); - -const port = process.env.PORT || 3000; - -const server = http.createServer((req, res) => { - if (req.url === '/') { - // Serve the index.html file - const filePath = path.join(__dirname, 'index.html'); - fs.readFile(filePath, 'utf8', (err, data) => { - if (err) { - res.writeHead(500); - res.end('Error loading the page'); - } else { - res.writeHead(200, { 'Content-Type': 'text/html' }); - res.end(data); - } - }); - } else { - // Handle 404 - Not Found - res.writeHead(404); - res.end('Page not found'); - } -}); - -server.listen(port, () => { - console.log(`Server running on http://localhost:${port}/`); -}); - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 61b5dcb..0000000 --- a/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "papa-node-hello-000", - "version": "1.0.0", - "lockfileVersion": 1 -} diff --git a/package.json b/package.json deleted file mode 100644 index b0d12df..0000000 --- a/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "node-hello", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "start": "node index.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/johnpapa/node-hello.git" - }, - "keywords": [], - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/johnpapa/node-hello/issues" - }, - "homepage": "https://github.com/johnpapa/node-hello#readme" -}