Closed shannonlal closed 3 years ago
@shannonlal Thanks again! I actually wanted to make multiple example project below the /examples directory. Like rate-limiter-express-app, rate-limiter-fastify-app, rate-limiter-graphql-app. Can you wrap your example project with the directory called rate-limiter-yourtech-app ?
@ozkanonur Not a problem but I wanted to ask a couple of questions. If we are going to have multiple apps within the examples directory would you be open to using something like nx for a monorepo strategy? It has a lot of plugins with nestjs and would be useful for sharing code and a consistent package.json. Here are a couple of options I am thinking of:
1. No mono repo
/examples --/rate-limiter-express-app/ --/rate-limiter-fastify-app/ --/rate-limiter-graphql-app/ -- etc
2. Mono Repo for just examples /examples/ package.json nx.json jest.config.js .. /apps/ ---- NOTE: All apps would share the common package.json and same config files --/rate-limiter-express-app/ --/rate-limiter-fastify-app/ --/rate-limiter-graphql-app/
3. Mono Repo for everything package.json nx.json jest.config.js /lib/ -- Current rate-limiter-code. .. /apps/ ---- NOTE: All apps would share the common package.json and same config files --/rate-limiter-express-app/ --/rate-limiter-fastify-app/ --/rate-limiter-graphql-app/
Question for @ozkanonur . Which of the following would you be open to? My recommendation is number 2 as it starts moving in the correct direction. Number 3 is probably the better option in the long term but I may need some help setting up the lib directory and making sure the build artifact works.
@shannonlal Sorry I couldn't focus and read the PR correctly, working so hard on some other projects these days. I think something like nx could be nice so yes number 2 looks also good to me. It's much better to deal with workspaces than dealing with directories.
@ozkanonur this is a larger PR than I would normally like but it includes a couple of basic things. I removed the existing examples directory and created a simple nest.js workspace with one app. I have only added one default controller but was able to link the controller back to the parent dist
directory so we can test changes in the nestjs-rate-limiter project to see how they would impact the different test apps.
Here are the nest steps I am proposing:
If you are okay with the following I will start making small issues and PR to expand on the following.
@shannonlal Yes, I am okay with those steps. Sorry for the late response.
@ozkanonur Would you be open to approving this PR? It is already fairly large and I tend to make small PRs so it is easier to review. If you are okay to merge this I will start making smaller PRs based on the items above
The following PR is a proposal for expanding the examples directory (#26). I am proposing creating a NestJS sample app within example directory. Here is what is included in this PR:
dist
directory so it will always pull in the latest build code from the parent directoryPotential Issues
Value of this PR
@ozkanonur I welcome any comments/suggestions and refactoring. If you feel this is not the right way to do this you can reject the PR as well.