Use docker-compose.yml to deploy the node project

One, use docker-compose.ymland Dockerfilebuild the project

  • 1. Basic introduction of the project

    Use the expressframework's routing to access viewsstatic files in the directory

  • 2. The basic structure of the project

    .
    ├── Dockerfile
    ├── README.md
    ├── docker-compose.yml
    ├── index.js
    ├── package-lock.json
    ├── package.json
    └── views
        ├── index.html
        └── other.html
    
  • 3. index.jsFile code

    const express = require('express')
    const app = express(

Guess you like

Origin blog.csdn.net/kuangshp128/article/details/115035689