• Stars
    star
    293
  • Rank 141,748 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Blog example made with nestJS

NestJS Blog

This is an example of how to use nestjs with jwt and typeorm to build a basic blog API.

Use

  • Start the mysql container using docker
$ docker-compose up -d 
  • Start the nestjs process using to following
$ yarn start

Production

If you're going to use this example in production (or your own verison of it) it's recommended to run using the 'complied' JS version from dist. You can do this by using the following command

$ yarn start:prod

This command will also clean and build your dist folder

Development

For development, the best command to use is

$ yarn start:dev

This will start nodemon to reload our script when there's been any changes in the src directory

Testing

Unit testing

Unit tests can be ran by simply using the test script

$ yarn test

This will run jest on all .spec.ts files.

End to End testing (E2E)

End to end tests can be run by using the following command

$ yarn test:e2e

this will run jest on all .e2e-spec.ts files.

Coverage

Use jest to show you a coverage of your tests

$ yarn test:cov

Build your own NestJS application

Want to get started on your own NestJS application? Simply install the nest-cli npm i -g @nestjs/cli and use the command nest new my-application to create a new directory called my-application with nestjs ready to go!

Packages

I used a variety of packages to develop this example api. Here's a list of them and where I got them from

More Repositories

1

typeorm-polymorphic

Typeorm polymorphic relationship management
TypeScript
199
star
2

another-portfolio

My portfolio at https://ashleighsimonelli.co.uk
TypeScript
39
star
3

shleemy

🕙 Human readable datetime values for JavaScript and TypeScript.
TypeScript
30
star
4

nestjs-config-v2-prototype

An example/prototype of v2 for nestjs-config
TypeScript
7
star
5

GPIO

GPIO pin environment manager
PHP
5
star
6

wave-func

A strictly typed order of all the things that make up our reality as we know it. ⚛️ Ψ
TypeScript
5
star
7

css-cheat-sheet

5
star
8

stackerbot

Stackoverflow search github bot
TypeScript
4
star
9

areyouinfordinner-api

API for Are You In For Dinner 🍴
TypeScript
4
star
10

lineup

A football line up builder
TypeScript
3
star
11

teaching

Teaching session for Southend high school for boys
3
star
12

robot-car

A python project to build a pet car robot
Python
3
star
13

kli

TypeScript
3
star
14

reapit-react-test

TypeScript
2
star
15

shleemy-react

Date interval management for react
TypeScript
2
star
16

chipz

2
star
17

everblue-ui

A user-friendly, open source UI library built using styled-components and React.
TypeScript
2
star
18

beth-lessons

2
star
19

communication-experiment

An experiment of different methods of communication using nestjs
TypeScript
2
star
20

areyouinfordinner-app

App for communicating with the are you in for dinner API 🍴
TypeScript
2
star
21

wave

TypeScript
2
star
22

node-copter-controller

Controller for node copter
JavaScript
2
star
23

ludicrous

TypeScript
2
star
24

dotfiles

My dotfiles to keep my environments between machines similar
Shell
1
star
25

twig-test

Quick test for chunked array forming
TypeScript
1
star
26

LaraValidator

Laravel validation service provider to allow creation of validation classes
PHP
1
star
27

bashleigh

1
star
28

docker-inspector

Rust
1
star
29

typeormpaginate

TypeScript
1
star
30

smart-pi-dashboard-server

An open source smart dashboard project using a raspberry pi
TypeScript
1
star
31

electron-game-experiment

JavaScript
1
star
32

electron-md-editor

Edit your markdown files in a pretty electron application tutorial for Auth0
JavaScript
1
star