bronifty / serverless-mern-stack-vite

Home Page:vite-vercel-opal.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serverless-MERN-Stack

AWS

  • in /src/hooks/tasks:
  • uncomment const baseURL = '/api/v1/tasks/';
  • comment const baseURL = '/.netlify/functions/index/api/v1/tasks/';
  • requires serverless cli and serverless-offline npm packages
yarn build
sls offline start

Vercel

  • Note: Vercel cli may not work for linking this vite project (with 'vercel link'); you may need to put the code in source control and connect it to your Vercel account manually.
  • in /src/hooks/tasks:
  • uncomment const baseURL = '/api/v1/tasks/';
  • comment const baseURL = '/.netlify/functions/index/api/v1/tasks/';
  • requires vercel cli npm package
vercel dev

Netlify

  • in /src/hooks/tasks:
  • comment const baseURL = '/api/v1/tasks/';
  • uncomment const baseURL = '/.netlify/functions/index/api/v1/tasks/';
ntl dev

-Note:

  • aws and vercel are running on the /api/v1/tasks endpoint; netlify is running on /.netlify/functions/index/api/v1/tasks/ to run locally:
  • vercel or aws:
    • uncomment const baseURL = '/api/v1/tasks/';
    • comment const baseURL = '/.netlify/functions/index/api/v1/tasks/';
  • netlify:
    • uncomment const baseURL = '/.netlify/functions/index/api/v1/tasks/';
    • comment const baseURL = '/api/v1/tasks/';

About

vite-vercel-opal.vercel.app


Languages

Language:JavaScript 69.0%Language:CSS 29.7%Language:HTML 1.3%