How to run web app
dpny518 opened this issue · comments
Is there a guide how to actually get this running? for example do we use pm2, what is the node file to start, what are nginx config settings
This is not a node application. just run yarn run app:build
. you can get the static files such as js and html
Thank you, after running I get these files in app
build scripts tsconfig.script.json vite.config.ts
index.html script.sh vercel-build-ignore.sh
package.json src vercel-ignore-storybook.sh
public tsconfig.json vercel.json
and these in app/build
assets favicon.ico fetchWorker.js logo.png manifest.json robots.txt
the index.html file really does not have anything except wallet connect
what is the correct root path for /etc/nginx/sites-available/default server {
listen 80 default_server;
root /var/www/anchor-web-app/app/build;
server_name [your.domain.com] [your other domain if you want to];
index index.html index.htm;
location / {
}
}
here is my nginx config but still doesn't work
server {
listen 80 default_server;
root /var/www/anchor-web-app/app/build;
server_name app.example.com;
index index.html index.htm;
location / {
}
server {
listen *:443 ssl;
root /var/www/anchor-web-app/app;
server_name app.example.com;
ssl_certificate /etc/ssl/localhost+1.pem;
ssl_certificate_key /etc/ssl/localhost+1-key.pem;
}
ok the files end up being in app/build
the reason I couldn't see it before was the build kept failing due to node memory issues so this solves it
export NODE_OPTIONS=--max_old_space_size=4096
So to correctly build
cd anchor-web-app && export NODE_OPTIONS=--max_old_space_size=4096 && yarn install && yarn run app:build
Then static files are in
anchor-web-app/app/build/