https://github.com/zoltan-nz/product-app-typescript
TypeScript, Node.js, Express based API for Product App (Ember.js frontend)
https://github.com/zoltan-nz/product-app-typescript
Last synced: 3 months ago
JSON representation
TypeScript, Node.js, Express based API for Product App (Ember.js frontend)
- Host: GitHub
- URL: https://github.com/zoltan-nz/product-app-typescript
- Owner: zoltan-nz
- Created: 2016-11-21T05:07:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T22:45:10.000Z (over 8 years ago)
- Last Synced: 2025-03-30T13:03:43.630Z (6 months ago)
- Language: TypeScript
- Homepage:
- Size: 35.2 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Product App - Node.js - TypeScript
### Prerequisites
* Node.js v6 or higher.
* Yarn v0.20 or newer.### Basic folder configuration
```shell
$ cd ~/projects
$ mkdir product-app-typescript
$ cd product-app-typescript
$ touch .gitignore README.md
$ git init
$ npm init
```### Basic TypeScript setup
**Global packages**
Install useful tools in global namespace.
```shell
$ yarn global add tslint typescript ts-node nodemon concurrently mocha
```**Developer and type packages**
```shell
$ yarn add tslint typescript ts-node @types/node mocha @types/mocha nodemon nyc rimraf coveralls concurrently -D
```**Configuration files: `tsconfig.json`, `tslint.json`**
# Run
### Prerequesits
* Install Node.js v6 or newer.
* Install `npm` v4 or newer. (optional)
* Install `yarn` v0.19 or newer.**Install global packages with `yarn`**
```
$ yarn global add mocha typescript ts-node tslint nodemon
```**Install local packages with `yarn`**
```
$ yarn
```**Build and launch**
```
$ PORT=4000 NODE_ENV='production' yarn start
```Use `Postman` or `Insomnia` or your favourite `curl` command to request the server.
### Development
Launch the following three commands in separate terminal:
```
$ yarn watch:build
$ yarn watch:server
$ yarn watch:test
```
or run all together parallel with `concurrently`:```
$ yarn dev
```Linter (autofix on!):
```
$ yarn lint
```Build:
```
$ yarn build
```Build and test:
```
$ yarn test
```Build and launch:
```
$ yarn start
```or
```
$ DEBUG='product-app' yarn start
```Coverage report:
```
$ yarn test:coverage
```Install terminal command:
```
$ yarn deploy
$ product-app-server
```# API
Future api comes here...