more unit testing
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m36s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 1m36s
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
module.exports = {
|
||||
apps: [{
|
||||
name: 'flyer-crawler-api', // The name of our application in PM2
|
||||
// Explicitly set the working directory. This is crucial for reliability.
|
||||
cwd: '/var/www/flyer-crawler.projectium.com',
|
||||
script: 'npm', // The script to run (we want to run an npm command)
|
||||
args: 'run start', // The arguments to pass to the script (i.e., 'npm run start')
|
||||
env_production: {
|
||||
|
||||
@@ -20,6 +20,20 @@ server {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# This new block is the reverse proxy for your backend API.
|
||||
# It tells Nginx that any request starting with /api/ should be
|
||||
# forwarded to your Node.js server running on port 3001.
|
||||
location /api/ {
|
||||
# The trailing slash on the proxy_pass URL is crucial.
|
||||
# It tells Nginx to strip the `/api/` prefix from the request URI
|
||||
# before passing it to the backend server.
|
||||
proxy_pass http://localhost:3001/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# This block specifically targets requests for .mjs files.
|
||||
location ~ \.mjs$ {
|
||||
|
||||
Reference in New Issue
Block a user