Building a simple Phonebook REST App using TypeScript, Node.js, Koa.js and MongoDB.
Requirements
- MVC pattern
- Dependency Injection
- Database, MongoDB
- Models: Contact
- REST API, Json interface
- Unit tests
There are two methods for getting started with this repo.
Checkout this repo, install dependencies, then start the gulp process with the following:
> git clone https://github.com/sksaju/koa-ts-phonebook-app.git
> cd koa-ts-phonebook-app
> docker-compose up
Click here then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
> docker-compose up
Resource endpoints
path | method | |
---|---|---|
/api/contacts |
GET | list all record |
/api/contacts |
POST | create a new contact record |
/api/contacts/:mobile |
GET | get the individual record |
/api/contacts/:mobile |
PUT | update the whole record |
/api/contacts/:mobile |
DELETE | get the individual record |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Sk Saju