generated from UoaWDCC/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from UoaWDCC/backend/feat/loopback-init
Backend/feat/loopback init
- Loading branch information
Showing
35 changed files
with
12,908 additions
and
1,668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
node_modules | ||
dist | ||
npm-debug.log | ||
/dist | ||
# Cache used by TypeScript's incremental build | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: '@loopback/eslint-config', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# Transpiled JavaScript files from Typescript | ||
/dist | ||
|
||
# Cache used by TypeScript's incremental build | ||
*.tsbuildinfo | ||
|
||
/.idea/* | ||
/.vscode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true, | ||
"printWidth": 80, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Developer's Guide | ||
|
||
We use Visual Studio Code for developing LoopBack and recommend the same to our | ||
users. | ||
|
||
## VSCode setup | ||
|
||
Install the following extensions: | ||
|
||
- [eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) | ||
- [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
|
||
## Development workflow | ||
|
||
### Visual Studio Code | ||
|
||
1. Start the build task (Cmd+Shift+B) to run TypeScript compiler in the | ||
background, watching and recompiling files as you change them. Compilation | ||
errors will be shown in the VSCode's "PROBLEMS" window. | ||
|
||
2. Execute "Run Rest Task" from the Command Palette (Cmd+Shift+P) to re-run the | ||
test suite and lint the code for both programming and style errors. Linting | ||
errors will be shown in VSCode's "PROBLEMS" window. Failed tests are printed | ||
to terminal output only. | ||
|
||
### Other editors/IDEs | ||
|
||
1. Open a new terminal window/tab and start the continuous build process via | ||
`npm run build:watch`. It will run TypeScript compiler in watch mode, | ||
recompiling files as you change them. Any compilation errors will be printed | ||
to the terminal. | ||
|
||
2. In your main terminal window/tab, run `npm run test:dev` to re-run the test | ||
suite and lint the code for both programming and style errors. You should run | ||
this command manually whenever you have new changes to test. Test failures | ||
and linter errors will be printed to the terminal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# fsae-api | ||
|
||
This application is generated using [LoopBack initializer package](https://github.com/loopbackio/create-loopback). | ||
|
||
## Install dependencies | ||
|
||
By default, dependencies were installed when this application was generated. | ||
Whenever dependencies in `package.json` are changed, run the following command: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
To only install resolved dependencies in `package-lock.json`: | ||
|
||
```sh | ||
npm ci | ||
``` | ||
|
||
## Run the application | ||
|
||
```sh | ||
npm start | ||
``` | ||
|
||
You can also run `node .` to skip the build step. | ||
|
||
Open http://127.0.0.1:3000 in your browser. | ||
|
||
## Rebuild the project | ||
|
||
To incrementally build the project: | ||
|
||
```sh | ||
npm run build | ||
``` | ||
|
||
To force a full build by cleaning up cached artifacts: | ||
|
||
```sh | ||
npm run rebuild | ||
``` | ||
|
||
## Fix code style and formatting issues | ||
|
||
```sh | ||
npm run lint | ||
``` | ||
|
||
To automatically fix such issues: | ||
|
||
```sh | ||
npm run lint:fix | ||
``` | ||
|
||
## Other useful commands | ||
|
||
- `npm run migrate`: Migrate database schemas for models | ||
- `npm run openapi-spec`: Generate OpenAPI spec into a file | ||
- `npm run docker:build`: Build a Docker image for this application | ||
- `npm run docker:run`: Run this application inside a Docker container | ||
|
||
## Tests | ||
|
||
```sh | ||
npm test | ||
``` | ||
|
||
## What's next | ||
|
||
Please check out [LoopBack 4 documentation](https://loopback.io/doc/en/lb4/) to | ||
understand how you can continue to add features to this application. | ||
|
||
[![LoopBack](https://loopback.io/images/branding/powered-by-loopback/blue/powered-by-loopback-sm.png)](http://loopback.io/) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.