Code Monkey home page Code Monkey logo

docker_with_node.js-express.js's Introduction

Express.js server run on Docker

This is a simple Node.js and Express application that can be run using Docker.

Installation

Before running the application, you must have Docker installed on your system. If you don't have it already, you can download it here.

Clone this repository to your local machine:

https://github.com/mian-ali/docker_with_node.js-express.js.git

Navigate into the cloned repository:

cd docker_with_node.js-express.js

Build the Docker image using the provided Dockerfile:

docker build -t express-docker-image .

This will create a Docker image with the name express-docker-image . you can also check this command image

docker image ls

Usage

To start the application, run the following command:

docker run --rm -d -p 5000:5000 --name express-docker-container express-docker-image

This will start the application inside a Docker container and map port 5000 on your local machine to port 5000 inside the container.

You can now access the application by visiting http://localhost:5000 in your web browser.

Configuration

By default, the application listens on port 3000. If you want to change the port, you can modify the PORT environment variable in the Dockerfile or pass it as a command line argument when starting the container:

docker run -p 8080:8080 -e PORT=8080 your_project

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

docker_with_node.js-express.js's People

Contributors

mian-ali avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.