This project was generated using Nx - a set of extensible Dev Tools for Monorepos.
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
Below are core plugins used in this project:
- Angular
npm install --save-dev @nrwl/angular
- Nest
npm install --save-dev @nrwl/nest
- Node
npm install --save-dev @nrwl/node
There are also many community plugins you could add.
Run nx g @nrwl/angular:app my-app
to generate an application.
When using Nx, you can create multiple applications and libraries in the same workspace.
Run nx g @nrwl/angular:lib my-lib
to generate a library.
Libraries are sharable across libraries and applications. They can be imported from @wise-guy/mylib
.
Run nx serve my-app
for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run nx g @nrwl/angular:component my-component --project=my-app
to generate a new component.
Run nx build my-app
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run nx test my-app
to execute the unit tests via Jest.
Run nx affected:test
to execute the unit tests affected by a change.
Run ng e2e my-app
to execute the end-to-end tests via Cypress.
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
Run nx dep-graph
to see a diagram of the dependencies of your projects.
Visit the Nx Documentation to learn more.
Project is using AWS Elastic Beanstalk to provide scalabale and fault tolerant API.
API setup for new application includes the following steps:
- Create new Elastic Beanstalk Web server environment for each environment:
qa
,prod
. - Use the following environment settings:
WiseguyUserApi-<env-name>
for environment nameNode.js
(latest) for PlaftormSample application
for Application Code
Project is using MongoDB Atlas - fully managed MongoDB cloud database service, deployed to AWS.
Database setup for new application includes the following steps:
- Create an Organization in MongoDB Atlas
- Create a project for each environment:
dev
,qa
,prod
- Create a Cluster under each environment, use the same name as for environment. Choose AWS as Cloud Provider.
- Create a database
wiseguy
- Create the following collections:
bid
,offer
- Configure network access to you database, allowing IP addresses of your backend machines.
- Create a user called
api<env-name>
withRead and write to any database
privileges for every environment. - Add corresponding configuration to client application (parameters starting with
MONGODB_
).