Skip to content

Commit

Permalink
Merge branch 'release/v1.4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-lebleu committed Apr 25, 2021
2 parents 091723a + d0e8e86 commit afc39d0
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 209 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ node_js:
services: mysql
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS typeplate_test;'
script: mkdir -p ./dist/logs ./dist/env ./dist/public/archives ./dist/public/documents ./dist/public/audios ./dist/public/videos ./dist/public/images/master-copy ./dist/public/images/rescale && cp ./src/env/template.env ./dist/env/test.env && npm i typescript -g && npm i typeorm -g && npm i && tsc && typeorm schema:sync && npm run ci:test
after_success: npm run ci:coverage
script: mkdir -p ./dist/env && cp ./src/env/template.env ./dist/env/test.env && npm i typescript -g && npm i typeorm -g && npm i && tsc && typeorm schema:sync && npm run ci:test
cache:
directories:
- "node_modules"
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v1.4.4](https://github.com/konfer-be/typeplate/compare/v1.4.3...v1.4.4)
## [v1.4.5](https://github.com/konfer-be/typeplate/compare/v1.4.4...v1.4.5)

### Commits

- Remove Typedoc [`236583c`](https://github.com/konfer-be/typeplate/commit/236583c5c7737c83b92eda41d969d20a1f269ff9)
- Simplify starting project [`78322fb`](https://github.com/konfer-be/typeplate/commit/78322fbfad63a7034ceb425f8d8e88cdc4368083)
- Create directories in env config instead of npm script [`8858438`](https://github.com/konfer-be/typeplate/commit/8858438775cb3ae425d467c5ff83aaca865a08ab)
- Remove Husky hooks [`5b5d3dc`](https://github.com/konfer-be/typeplate/commit/5b5d3dcd5bc46dd45abf57ef24674bf48973c9a6)
- Simplify CI process [`a3415fd`](https://github.com/konfer-be/typeplate/commit/a3415fd365ccc133efb0c69a937162519e52080d)
- Improve CI duration [`05b12e2`](https://github.com/konfer-be/typeplate/commit/05b12e2ef539df3df08dab2b942b55ee5a48ae40)

## [v1.4.4](https://github.com/konfer-be/typeplate/compare/v1.4.3...v1.4.4) - 2021-04-24

### Commits

- API doc, update dependencies, fix media routes path in doc [`f9c3043`](https://github.com/konfer-be/typeplate/commit/f9c30436bd99487c6da11725ad3c737cf5ffc3f6)
- Update changelog [`5d02848`](https://github.com/konfer-be/typeplate/commit/5d0284872a30bc33a993c9adf3669654a0981d4d)

## [v1.4.3](https://github.com/konfer-be/typeplate/compare/v1.4.2...v1.4.3) - 2021-04-23

Expand Down
66 changes: 15 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ Thanks to Daniel F. Sousa for inspiration with her [Express ES2017 REST API boil

- **Basics**
- **Clear & clean code architecture** with classic layers such controllers, services, repositories, models, ...
- **Business validation** with business service and business rule interface.
- **Object Relational Mapping** with [typeorm](https://typeorm.io/#/).
- **Entity generation** (controller, route, repository, model, validations, interfaces, subscriber, test, fixture) with [rsgen](https://github.com/konfer-be/rsgen).
- **Entity generation** with [rsgen](https://github.com/konfer-be/rsgen).
- **Business validation** with self designed business members.
- **Logs management** with [morgan](https://github.com/expressjs/morgan) and [winston](https://github.com/winstonjs/winston).
- **Changelog completion** with [auto-changelog](https://www.npmjs.com/package/auto-changelog).
- **Testing** with included unit and e2e test sets builded with [mocha](https://mochajs.org/), [chai](https://www.chaijs.com/), [sinon](https://sinonjs.org/) and [supertest](https://github.com/visionmedia/supertest).
- **Documentation** with [api-doc](https://apidocjs.com/) and [typedoc](https://typedoc.org/).
- **Documentation** with [api-doc](https://apidocjs.com/).
- **Security**
- **SSL secure connection** with native [HTTPS node module](https://nodejs.org/docs/latest-v14.x/api/https.html).
- **Cross Origin Resource Sharing** with [CORS](https://expressjs.com/en/resources/middleware/cors.html).
- **Securized HTTP headers** with [helmet](https://helmetjs.github.io/).
- **HTTP header pollution** preventing with [hpp](https://www.npmjs.com/package/hpp).
- **API request rate limit** with [express-rate-limit](https://www.npmjs.com/package/express-rate-limit).
- **Route validation** with [joi](https://github.com/hapijs/joi).
- **HTTP friendly errors** with obfuscated messages based on a custom pipe with [boom](https://github.com/hapijs/boom) and [http-status](https://www.npmjs.com/package/http-status).
- **HTTP friendly errors** with [boom](https://github.com/hapijs/boom) and [http-status](https://www.npmjs.com/package/http-status).
- **Authentication**
- **JWT authentication process** with [passport.js](http://www.passportjs.org/).
- **oAuth authentication process** with [passport.js](http://www.passportjs.org/).
Expand All @@ -45,7 +45,7 @@ Thanks to Daniel F. Sousa for inspiration with her [Express ES2017 REST API boil
- **Database query cache** with [typeorm caching](https://github.com/typeorm/typeorm/blob/master/docs/caching.md).
- **Assets management**
- **Customizable file upload** with [multer](https://www.npmjs.com/package/multer).
- **Customizable image resizing** designed for front-end requirements with [jimp](https://www.npmjs.com/package/jimp).
- **Customizable image resizing** with [jimp](https://www.npmjs.com/package/jimp).

## > Table of contents

Expand Down Expand Up @@ -74,7 +74,7 @@ When you're with that, starting your project is a matter of minutes. :clock12:
$ git clone https://github.com/konfer-be/typeplate.git path-to/your-project-name/
```

### Step 2: go to your project
### Step 2: go to

```bash
$ cd path-to/your-project-name/
Expand All @@ -83,20 +83,14 @@ $ cd path-to/your-project-name/
### Step 3: build

```bash
$ npm run kickstart
$ npm run kickstart:dev
```

### Step 4: setup git

```bash
$ rm -rf ./.git && npm run build:repo
```

### Step 5: setup package.json
### Step 4: setup package.json

Open the *./package.json* file and edit it with your own values.

### Step 6: setup environment variables
### Step 5: setup environment

Open *./dist/env/development.env* and fill the required env variables (uncommented in the file). See [env variables list](https://github.com/konfer-be/typeplate/wiki/Environment-variables) for more informations.

Expand Down Expand Up @@ -135,56 +129,34 @@ TYPEORM_PWD = ""
TYPEORM_PORT = "3306"
```

### Step 7: setup cliamrc.json for sending transactional email

Transactional emails are used in authentication process, to confirm an account or execute a new password request. Currently supported providers are Mailgun, Mailjet, Postmark, Sendgrid, Sendinblue and Sparkpost. If you're not with them, you can use a simple SMTP server (default with [ethereal](https://ethereal.email/)).
### Step 6: setup cliamrc.json

Open the *.cliamrc.json* and fill the [required configuration](https://github.com/konfer-be/cliam/wiki/Configuration) according your sending mode. See Cliam official [documentation](https://github.com/konfer-be/cliam/wiki) for more information.
Transactional emails are send with [cliam](https://github.com/konfer-be/cliam) behind the scene. Open the *.cliamrc.json* and fill the [required configuration](https://github.com/konfer-be/cliam/wiki/Configuration) according your sending mode. See Cliam official [documentation](https://github.com/konfer-be/cliam/wiki) for more information.

Sandbox is set to true by default and emails are not send. Pass this value to false when you're ready.

### Step 8: compile

```bash
$ tsc
```

### Step 9: run & enjoy
### Step 7: run

```bash
$ nodemon
```

## > Entity generation

Some repetitive tasks such as creating resources can be done easily with [rsgen](https://github.com/konfer-be/rsgen). This small tool allow you to generate a complete set of resources who are linked to an entity.
Some repetitive tasks such as creating resources can be done easily with [rsgen](https://github.com/konfer-be/rsgen).

See the [entity generation](https://github.com/konfer-be/typeplate/wiki/Entity-generation) wiki section to see the complete list of generated elements and how to.
See [entity generation](https://github.com/konfer-be/typeplate/wiki/Entity-generation) wiki section to learn more about generated elements and how to use.

## > Documentation

```bash
$ npm run doc:apidoc
$ npm run doc
```

Generate API documentation website into *./docs/apidoc/*.

See [apidoc](http://apidocjs.com/) for more informations about customization.

```bash
$ npm run doc:typedoc
```

Generate code documentation website into *./docs/typedoc/*.

See [typedoc](https://typedoc.org/) for more informations about customization.

```bash
$ npm run doc
```

Generate api and code documentation websites into *./docs/*.

## > Tests

```bash
Expand Down Expand Up @@ -241,18 +213,10 @@ $ pm2 deploy production setup

# Update remote version
$ pm2 deploy production update

# Revert to -1 deployment
$ pm2 deploy production revert 1
```

More info about [PM2](http://pm2.keymetrics.io/docs/usage/quick-start/) and [PM2 deploy](https://pm2.io/doc/en/runtime/guide/easy-deploy-with-ssh/).

## > Related links

- More info about [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
- More info about [ormconfig file](http://typeorm.io/#/using-ormconfig) and [typeorm cli](https://typeorm.io/#/using-cli/installing-cli)

## > License

[MIT](/LICENSE)
117 changes: 1 addition & 116 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit afc39d0

Please sign in to comment.