vc-summer-2024-captstone-web / food-market-web-app

https://food-market-web-app.netlify.app
2 stars 0 forks source link

Food Market Web App

Netlify Status Astro Studio CodeQL Prettier Code Formatter

🚀 Quick start

  1. Use correct node version

    nvm use

    If you don't have the correct node version installed, you can install it by running the following command:

    nvm install

    then rerun:

    nvm use

    Note: This will install the node version specified in the .nvmrc file

    NVM for Mac/Linux/WSL: https://github.com/nvm-sh/nvm

    NVM for Windows: https://github.com/coreybutler/nvm-windows

  2. Install dependencies

    npm install

    Also make sure you have the netlify-cli installed by running the following command:

    npm install -g netlify-cli
  3. Start the development server

    npm run dev

    or if you want to start the development server with the netlify functions:

    npm run dev:netlify

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
npm install Installs dependencies
npm run dev Starts local dev server at localhost:4321
npm run dev:netlify Run a local dev server in a netlify like environment
npm run build Build production site to ./dist/
npm run build:remote Build production site and production database to ./dist/
npm run build:netlify Build production in a netlify like environment
npm run preview Preview your build locally, before deploying
npm run astro ... Run CLI commands like astro add, astro check
npm run astro -- --help Get help using the Astro CLI
npm run format Run prettier formatter
npm run lint Run prettier and astro linters

📁 Project Structure

Inside of your Astro project, you'll see the following folders and files:

/
├── public/
│   └── favicon.svg
├── src/
│   ├── components/
│   │   └── Card.astro
│   ├── layouts/
│   │   └── Layout.astro
│   └── pages/
│       └── index.astro
└── package.json

Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.

There's nothing special about src/components/, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the public/ directory.

👀 Want to learn more?

Feel free to check our documentation or jump into our Discord server.