{"id":16269736,"url":"https://github.com/tairov/sample-node-app","last_synced_at":"2026-03-14T20:32:14.291Z","repository":{"id":183329067,"uuid":"213583546","full_name":"tairov/sample-node-app","owner":"tairov","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-24T00:52:42.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T00:15:32.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tairov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-10-08T08:04:19.000Z","updated_at":"2023-07-26T19:16:24.000Z","dependencies_parsed_at":"2023-07-24T03:15:05.688Z","dependency_job_id":null,"html_url":"https://github.com/tairov/sample-node-app","commit_stats":null,"previous_names":["tairov/sample-node-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tairov%2Fsample-node-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tairov%2Fsample-node-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tairov%2Fsample-node-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tairov%2Fsample-node-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tairov","download_url":"https://codeload.github.com/tairov/sample-node-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235039170,"owners_count":18926302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T18:08:59.923Z","updated_at":"2025-10-02T20:30:22.892Z","avatar_url":"https://github.com/tairov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Sample Node.js App for Docker Deployment Testing\n\nThis repository contains a simple Node.js application named `app.js` and a Dockerfile to facilitate easy Docker deployments on different environments.\n\n## Purpose\n\nThe main goal of this application is to serve as a testing ground for Docker deployments on various environments. It provides a basic Node.js web server using the Express framework to showcase how a Node.js application can be containerized with Docker.\n\n## Prerequisites\n\nBefore running the Dockerized application, you need to have Docker installed on your system.\n\n## Running the App with Docker\n\nFollow these steps to run the sample Node.js app using Docker:\n\n1. Clone this repository to your local machine:\n\n   ```bash\n   git clone https://github.com/your-username/sample-node-app.git\n   cd sample-node-app\n   ```\n\n2. Build the Docker image using the provided Dockerfile:\n\n   ```bash\n   docker build -t sample-node-app .\n   ```\n\n3. Run the Docker container from the built image:\n\n   ```bash\n   docker run -d -p 8080:8080 --name sample-node-app-container sample-node-app\n   ```\n\n   The application will start within the Docker container, and it will be accessible at [http://localhost:8080/](http://localhost:8080/).\n\n## Routes\n\nThe application defines the following routes:\n\n`curl` examples to run the endpoints of the sample Node.js app locally:\n\n1. **GET /:**\n\n   This endpoint returns a simple message indicating that the Node Sample App is up and running.\n\n   ```bash\n   curl http://localhost:8080/\n   ```\n\n   Output:\n\n   ```\n   Hello World!!! Node Sample App is up and running!\n   ```\n\n2. **GET /ping:**\n\n   This endpoint returns \"Pong!\" as the response.\n\n   ```bash\n   curl http://localhost:8080/ping\n   ```\n\n   Output:\n\n   ```\n   Pong!\n   ```\n\n3. **POST /ping:**\n\n   This endpoint returns \"POST: Pong!\" as the response.\n\n   ```bash\n   curl -X POST http://localhost:8080/ping\n   ```\n\n   Output:\n\n   ```\n   POST: Pong!\n   ```\n\n## Dockerfile\n\nThe repository includes a `Dockerfile` that sets up the Node.js environment, installs the app dependencies, and exposes port 8080 for communication with the outside world. The final image is based on the official Node.js Alpine image to keep it lightweight.\n\n```Dockerfile\nFROM node:alpine\n\n# Create app directory\nWORKDIR /usr/src/app\n\n# Install app dependencies\nCOPY package.json .\nRUN npm install\n\n# Bundle app source\nCOPY . .\n\nEXPOSE 8080\n\nCMD [ \"npm\", \"start\" ]\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nFeel free to use this sample Node.js application and the provided Dockerfile as a starting point for your Docker deployments on different environments. Happy testing and coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftairov%2Fsample-node-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftairov%2Fsample-node-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftairov%2Fsample-node-app/lists"}