Skip to content

pesto-garden/app

Repository files navigation

Pesto

sudo apt install gettext

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

To deploy your app, you may need to install an adapter for your target environment.

Nginx config

server {

    server_name yourdomain;
    listen [::]:443 ssl;
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/yourdomain/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    index index.html;
    root /var/www/html/pesto;

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_min_length 256;
    gzip_types
        application/atom+xml
        application/geo+json
        application/javascript
        application/x-javascript
        application/json
        application/ld+json
        application/manifest+json
        application/rdf+xml
        application/rss+xml
        application/xhtml+xml
        application/xml
        font/eot
        font/otf
        font/ttf
        image/svg+xml
        text/css
        text/javascript
        text/plain
        text/xml;

    #    add_header Content-Security-Policy  "default-src 'self'; style-src: 'self'; style-src-attr 'unsafe-inline'; style-src-elem 'unsafe-inline' 'self'; script-src 'unsafe-inline' 'unsafe-eval' 'self'; connect-src *;";

    location / {
        try_files $uri /404.html;
    }

    location ^~ /_app/immutable/ {
        expires 14d;
        add_header Cache-Control private;
        access_log off;
        try_files $uri $uri/;
    }
}