Coder Social home page Coder Social logo

Comments (3)

johannesschobel avatar johannesschobel commented on May 16, 2024 2

Dear @elitan ,

thanks for answering to my issue / feature request.
A typical nrwl project is structured as follows:

apps\
  todos-www\
  todos-api\
  todos-mobile\
  todos-xyz\
libs\
  // no real defined structure of the libraries, may be feature-specific, or application specific, ...
package.json

So basically, all your apps reside in the apps folder, whereas the name of the application is customizable (does not need to be named api but can also be called backend-for-todos or whatever).

Note that nrwl follows the single package.json approach. i.e., there is only one single package.json file within the entire repository. Building specific apps (i.e., the api) is done using nrwl-specific command-wrappers, like

nx build <NAME>          // i.e., nx build backend-for-todos

This command, in turn, builds the project based on the workspace definition for this specific application. Furthermore, it finds related packages in the libs folder (i.e., libs/api/auth) and bundles it all together into one single application. This approach guarantees a highly reusable application structure.

In terms of the Custom API feature, I thought about having a settings parameter within the nhost admin console where the path within the repository may be customized. As a default value, the /api value may be provided. However, in my nrwl/nx setting, i could change it to apps/backend-for-todos ...

However, it is not clear to me, how i would "bundle" my application properly? Because i would need to build the app first to be deployed, right? Do we need to call custom npm scripts first?

All the best

from nhost.

elitan avatar elitan commented on May 16, 2024

Hi @johannesschobel

Yea I think this makes sense. We might not want to change the api/ folder but we could allow repositories with a Nhost app in a subfolder. Similar to https://vercel.com/blog/monorepos

Could you describe a bit more in detail your preferred folder structure for your monorepo?

from nhost.

elitan avatar elitan commented on May 16, 2024

This is now working: https://docs.nhost.io/platform/github-integration#base-directory

from nhost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.