# Sales Website

Because of the wide variety of services and options for creating and hosting sales websites these days, Nodewood does not ship with a sales website. Instead, Nodewood routes all requests that aren't for the UI (begins with /app) or API (begins with /api) to the www/dist folder. If you have a static website, you can simply place your files there and it will serve those files as expected. If you are using a static website builder, you can put your source files in www/src and set it to build to www/dist, then deploy as normal.

If you wish to use a dynamic service or a different directory to serve your sales website from (perhaps your build process is a bit finicky about where it puts its files), you can modify the Nginx configuration a little to serve the root of your site from one location, then ONLY serve app and api requests from your Nodewood application:

server {
  server_name {{ server_domain }};

  root /home/some/other/static/site/builder/dist;

  index index.html index.htm;

  location ~ ^/(app|api) {
    proxy_pass http://127.0.0.1:3000;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_cache_bypass $http_upgrade;
    proxy_max_temp_file_size 0;
  }

The above snippet will still serve requests to app and api through the Nodewood application, but will fall back to attempting to serve static files from the directory specified in the root directive.

This technique can be modified for a variety of site builders or services.