Anchor-Protocol / anchor-web-app

A monorepo containing everything user-facing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run web app

dpny518 opened this issue · comments

commented

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

commented

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 / {
}
}

commented

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;
}
commented

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/