test-project
This commit is contained in:
@@ -16,8 +16,11 @@ COPY . .
|
||||
# Build the React.js application
|
||||
RUN npm run build
|
||||
|
||||
# Install serve globally so startup is instant (no npx download delay)
|
||||
RUN npm install -g serve
|
||||
|
||||
# Expose the port that the application listens on
|
||||
EXPOSE 3001
|
||||
EXPOSE 3000
|
||||
|
||||
# Start a simple web server to serve the built React.js files
|
||||
CMD [ "npx", "serve", "-s", "build" ]
|
||||
CMD [ "serve", "-s", "build" ]
|
||||
|
||||
@@ -2,7 +2,7 @@ import "./App.css";
|
||||
import axios from "axios";
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
const URL = "http://localhost:3000";
|
||||
const URL = "/api";
|
||||
function App() {
|
||||
const [data, setData] = useState([]);
|
||||
const [inputValue, setInputValue] = useState("");
|
||||
|
||||
Reference in New Issue
Block a user