app-membership-moderation-support
v1.0.3
Published
[](https://drone.spk.hotmart.com/Hotmart-Org/app-membership-moderation-support)
Readme
Hotmart Membership Moderation & Support
app-membership-moderation-support
Micro-frontend for membership moderation and support features
Getting started
Prerequisites
Hotctl
First check if Hotctl is already installed on your machine (If it is already installed, you can skip to the next step).
Link https://github.com/Hotmart-Org/hotctl#hotctl
Prerequisite aws cli
hotctl sso inithotctl sso loginhotctl eks context --profile buildstaginghotctl sso accounts apply -a
Url: https://hotmart.awsapps.com/start
Region: us-east-1
hotctl codeartifact token --type npm --profile buildstaging --role Developers
Configuring the Hosts File
Add the address local.buildstaging.com into your host's file /etc/hosts:
127.0.0.1 local.buildstaging.comCreate a SSL certificate
The app requires SSL certificate to run locally. To create a SSL certificate, you can use mkcert. Run commands in the project root:
mkcert -install
mkcert local.buildstaging.com localhost 127.0.0.1 ::1Create .npmrc file
In the root of the project, create a .npmrc file with the content:
//registry.npmjs.org/:_authToken=npm_[TOKEN]
//npm.fontawesome.com/:_authToken=[TOKEN]
@fortawesome:registry=https://npm.fontawesome.com/
@hotmart-org-ca:registry=https://hotmart-artifacts-315120000506.d.codeartifact.us-east-1.amazonaws.com/npm/npm/
//hotmart-artifacts-315120000506.d.codeartifact.us-east-1.amazonaws.com/npm/npm/:_authToken=[TOKEN]
//hotmart-artifacts-315120000506.d.codeartifact.us-east-1.amazonaws.com/npm/npm/:always-auth=trueTo request the [TOKEN] send a message in the Google Chat to Front-End space.
Install dependencies
Run npm i to install dependencies.
Configuring languages
// TODO
Running the project
Run npm run dev to start the project. The project will be available at local.buildstaging.com:3338.
Keep in mind that this project it's a Microfront used in Membership - Shell and with
npm run devyou will need to setup a this env in order to be able to run this MFE
Available Commands
| Command | Description |
| :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
| npm run dev | Starts the application in development mode. |
| npm run build:staging | Creates the staging version. |
| npm run build | Creates the production version. |
| npm run bundle:analyzer | Builds app e starts a server on port 8888 to analyze production bundles. Can be used to aid in the process of splitting code and reducing file size. |
| npm run lint | Runs linter on all files that are in the configuration rule. |
| npm run lint:fix | Runs linter and fixes all files that are in the configuration rule. |
| npm run type-check | Checks if the file types are correct. |
| npm run test | Runs unit tests globally generating code coverage. |
| npm run test:w | Runs unit tests in watching mode. |
| npm run test:clearCache | Clear jest cache. |
Happy coding!
Copyright
Hotmart © 2024
Made with ❤
