0

This question is related to React + backend - project structure when sharing code, but is aimed at Javascript (not TypeScript) and deployement onto a Azure Static Web App resource


I want to get my project as below, separating the front and the api source code.

root
├── common
|   ├── classes
|   └── helpers
│       └── ...
├── api
|   ├── node_modules
|   ├── functions
│   │   └── ...
|   ├── package-lock.json
|   |── package.json
|   └── ...
└── frontend (created using vite+React+Javascript)
    ├── node_modules
    ├── public
    ├── src
    |   ├── App.jsx
    │   └── ...
    ├── package-lock.json
    |── package.json
    └── ...

I'm stuck at writing the last step of the Azure pipelines:

- task: AzureStaticWebApp@0
  inputs:
    app_location: 'frontend'
    api_location: 'api'
    output_location: 'dist'
    azure_static_web_apps_api_token: $(deployment_token)

Is the a way to tell the pipeline to copy the common directory at the same location of api and the frontend directories?

1
  • It sounds like I could create a static package (npm pack) from the shared directory and then install it both in api and frontend Commented Sep 19 at 19:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.