How to make RPI 3+ into wlan http server with a node js backend

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Hello, I’ve been stuck trying to figure out how to serve up a nodejs api via nginx on my Raspberry pi 3+. Here is a my Dockerfile Dockerfile: # Stage 0: Build react image # pull official base image FROM node:14.10.1-alpine3.11 as build # set working directory WORKDIR /app # add app COPY . . # start app CMD [“npm”, “start”] # Stage 1: Setup nginx http server FROM nginx:1.15 COPY –from=build /app/helloworld /usr/share/nginx.html # Copy the default nginx.conf provided by tiangolo/node-frontend COPY –from=build /nginx.conf /etc/nginx/conf.d EXPOSE 80 CMD [“nginx”, “-g”, “daemon off;”] My App is the canonical React app Hello-world. When I curl the ip address of the rpi with http, I get the nginx default page. I am trying to learn how to create a webserver with nodejs backend but with docker. I can curl w/ http from a different computer on the same wlan as the rpi 3+ the React app. Here is the nginx.conf copied from inside the container. nginx.conf: server { listen 80; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /app/hello-world/publix/index.html; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } I am guessing at this point but I feel I am close. Thanks for any help. submitted by /u/ActIII03 [link] [comments]

X ITM Cloud News

Patricia

Leave a Reply

Next Post

Whalescan an open source security vulnerability scanner for Windows containers

Wed Sep 16 , 2020
Spread the love          Whalescan is an open source vulnerability scanner for Windows containers which Performs several benchmark checks Checks for CVEs/vulnerable packages on the container checks the config and Docker files for misconfigurations Open source project is here – https://github.com/nccgroup/whalescan submitted by /u/digicat [link] [comments] X ITM Cloud News
X- ITM

Cloud Computing – Consultancy – Development – Hosting – APIs – Legacy Systems

X-ITM Technology helps our customers across the entire enterprise technology stack with differentiated industry solutions. We modernize IT, optimize data architectures, and make everything secure, scalable and orchestrated across public, private and hybrid clouds.

This image has an empty alt attribute; its file name is x-itmdc.jpg

The enterprise technology stack includes ITO; Cloud and Security Services; Applications and Industry IP; Data, Analytics and Engineering Services; and Advisory.

Watch an animation of  X-ITM‘s Enterprise Technology Stack

We combine years of experience running mission-critical systems with the latest digital innovations to deliver better business outcomes and new levels of performance, competitiveness and experiences for our customers and their stakeholders.

X-ITM invests in three key drivers of growth: People, Customers and Operational Execution.

The company’s global scale, talent and innovation platforms serve 6,000 private and public-sector clients in 70 countries.

X-ITM’s extensive partner network helps drive collaboration and leverage technology independence. The company has established more than 200 industry-leading global Partner Network relationships, including 15 strategic partners: Amazon Web Services, AT&T, Dell Technologies, Google Cloud, HCL, HP, HPE, IBM, Micro Focus, Microsoft, Oracle, PwC, SAP, ServiceNow and VMware

.

X ITM