Skip to content

Commit

Permalink
Merge pull request #874 from OneCommunityGlobal/revert-870-development
Browse files Browse the repository at this point in the history
Revert "Backend Release to Main [1.58]"
  • Loading branch information
one-community authored Apr 10, 2024
2 parents f1e3001 + e79e7ad commit 71b8418
Show file tree
Hide file tree
Showing 59 changed files with 4,542 additions and 12,072 deletions.
33 changes: 14 additions & 19 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
{
"presets": ["@babel/preset-env"],
"plugins": [
"@babel/plugin-transform-async-to-generator",
[
"@babel/plugin-transform-runtime",
{
"corejs": false,
"helpers": true,
"regenerator": true,
"useESModules": false
}
],
[
"module-resolver",
{
"presets" : ["@babel/preset-env"],
"plugins":
["@babel/plugin-transform-async-to-generator",
["@babel/plugin-transform-runtime",
{
"corejs": false,
"helpers": true,
"regenerator": true,
"useESModules": false
}
],
["module-resolver", {
"root": "./src"
}
}]
]
],
"ignore": ["**/*.test.js", "**/*.spec.js", "src/test/**"]
}
}
6 changes: 1 addition & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
node_modules
launch.json
jest-env-vars.js
coverage
dist
/dist
22 changes: 6 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": ["eslint:recommended", "airbnb-base", "prettier"],
"extends": ["eslint:recommended", "airbnb-base"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"sourceType": "module"
},
"env": { "es6": true, "node": true, "commonjs": true },
"rules": {
Expand All @@ -16,21 +16,11 @@
"no-await-in-loop": "warn",
"template-curly-spacing": "off",
"indent": "off",
"linebreak-style": 0,
"no-console": "off",
"consistent-return": "off",
"linebreak-style": 0
},
"settings": {
"import/resolver": {
"babel-module": {},
},
},
"overrides": [
{
"files": ["**/*.test.js", "**/*.spec.js", "src/test/*.js"],
"env": {
"jest": true,
},
},
],
"babel-module": {}
}
}
}
7 changes: 3 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ To test this backend PR you need to checkout the #XXX frontend PR.
## How to test:
1. check into current branch
2. do `npm install` and `...` to run this PR locally
3. Clear site data/cache
4. log as admin user
5. go to dashboard→ Tasks→ task→…
6. verify function “A” (feel free to include screenshot here)
3. log as admin user
4. go to dashboard→ Tasks→ task→…
5. verify function “A” (feel free to include screenshot here)

## Screenshots or videos of changes:

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ testem.log

#IDE specific

/.vscode
/.vscode

9 changes: 0 additions & 9 deletions .husky/commit-msg

This file was deleted.

3 changes: 0 additions & 3 deletions .husky/pre-commit

This file was deleted.

3 changes: 0 additions & 3 deletions .lintstagedrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# HGNRest

`npm install` to install the dependencies. `npm start` to run the application
'npm install' to install the dependencies. 'npm start' to run the application

To get started, make sure you have:
To get started, make sure you have:

1. Node v9.5 or higher installed on your machine.
2. A decent code editor like VS Code or Atom.
3. Git

Step1: Clone the App
To clone the code, navigate to the source directory where you want to maintain the code and via terminal or GUI of your choice, run : git clone https://github.com/OneCommunityGlobal/HGNRest.git . You can also setup SSH and then use that for working with remote.
To clone the code, navigate to the source directory where you want to maintain the code and via terminal or GUI of your choice, run : git clone https://github.com/OneCommunityGlobal/HGNRest.git . You can also setup SSH and then use that for working with remote.

Step2: Run npm install. Best way is to open the code in the editor and open integrated teminal. Run npm install.

Step3: If running on MacOS or Linux, run `npm run prepare-macos-linux`. This will install husky and allow integration with git hooks. Windows users don't need and should not run this command.

Step4: Start the app: To start the app, you need to set up several process.env variables. These variables are:
Step3: Start the app: To start the app, you need to set up several process.env variables. These variables are:
user=<user>
password=<password>
cluster=<clustername>
Expand All @@ -28,27 +26,28 @@ SMTPPort=<smtp port>
SMTPUser=<smtp user>
TOKEN_LIFETIME=<number>
TOKEN_LIFETIME_UNITS=<unit like days, second, hours etc>
JWT_SECRET=<secret value>
JWT_SECRET=<secret value>

To make the process easy create a .env file and put the above text in the file and replace values with the correct values, which you can get from your teammates. Then do an npm run-script build followed by an npm start. By default, the services will start on port 4500 and you can http://localhost:4500/api/<routename> to access the methods. A tools like Postman will be your best friend here, you will need to have an auth token placed in the 'Authorization' header which you can get through the networking tab of the local frontend when you login.

- `npm run lint` -- fix lint
- `npm run build` -- build src server and save in dist
- `npm run buildw` -- auto rebuild upon change of src
- `npm run start` -- run the server in dist
- `npm run serve` -- run the server in src without build
- `npm run dev` -- run the server in src and auto restart upon change of src
* `npm run lint` -- fix lint
* `npm run build` -- build src server and save in dist
* `npm run buildw` -- auto rebuild upon change of src
* `npm run start` -- run the server in dist
* `npm run serve` -- run the server in src without build
* `npm run dev` -- run the server in src and auto restart upon change of src

Note: Once you check in the code in github, the application will be publsihed to the following:
Developement : https://hgn-rest-dev.herokuapp.com
Note: Once you check in the code in github, the application will be publsihed to the following:
Developement : https://hgn-rest-dev.herokuapp.com
Master: https://hgn-rest.azurewebsites.net/

## BIG THANKS

- Monitoring and logging provided by [Sentry.io](https://sentry.io/welcome/)
- Hosting provided by [Microsoft Azure](https://azure.microsoft.com/en-us/) and [Heroku](https://www.heroku.com/)


Other key touchpoints:

Build and hosting: Azure and Heroku
Build and hosting: Azure and Heroku
Monitoring and logging: Sentry.io
4 changes: 0 additions & 4 deletions jest-integration.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions jest-unit.config.js

This file was deleted.

13 changes: 0 additions & 13 deletions jest.config.js

This file was deleted.

Loading

0 comments on commit 71b8418

Please sign in to comment.