Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yacosta738/hn-feed
Hacker news Feed
https://github.com/yacosta738/hn-feed
Last synced: 3 days ago
JSON representation
Hacker news Feed
- Host: GitHub
- URL: https://github.com/yacosta738/hn-feed
- Owner: yacosta738
- License: mit
- Created: 2021-05-09T22:41:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-19T13:33:13.000Z (over 3 years ago)
- Last Synced: 2024-10-17T19:56:43.871Z (21 days ago)
- Language: TypeScript
- Homepage: hn-feed.vercel.app
- Size: 1.27 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HnFeed
This project was generated using [Nx](https://nx.dev).
🔎 **Powerful, Extensible Dev Tools**
## Quick Start & Documentation
[Nx Documentation](https://nx.dev/angular)
[10-minute video showing all Nx features](https://nx.dev/angular/getting-started/what-is-nx)
[Interactive Tutorial](https://nx.dev/angular/tutorial/01-create-application)
## Installation
```bash
$ npm install
```## Running the app
```bash
# development client app
$ npm run start
# development server app
$ npm run start:server# build the app
$ npm run build
```## Docker
There is a `docker-compose.yml` file for starting MongoDB with Docker.
`$ docker-compose up`
After running, you can stop the Docker container with
`$ docker-compose down`
## Getting with Curl Posts
```bash
$ curl -H 'content-type: application/json' -v -X GET http://127.0.0.1:3333/api/posts
$ curl -H 'content-type: application/json' -v -X GET http://127.0.0.1:3333/api/posts/:id
$ curl -H 'content-type: application/json' -v -X POST -d '{"objectID": "987655", "title": "title #1", "url": "https://www.blastkode.com", "author": "Yuniel Acosta", "createdAt": "2021-05-06T19:23:46.000Z"}' http://127.0.0.1:3333/api/posts
$ curl -H 'content-type: application/json' -v -X PUT -d '{"objectID": "987656", "title": "title #1", "url": "https://www.blastkode.com", "author": "Yuniel Acosta", "createdAt": "2021-05-06T19:23:46.000Z"}' http://127.0.0.1:3333/api/posts/:id
$ curl -H 'content-type: application/json' -v -X DELETE http://127.0.0.1:3333/api/posts/:id
$ curl -H 'content-type: application/json' -v -X DELETE http://127.0.0.1:3333/api/posts/remove/:id
```## Getting Pagination using limit and offset
```bash
$ curl -H 'content-type: application/json' -v -X GET http://127.0.0.1:3333/api/posts?limit=10
``````bash
$ curl -H 'content-type: application/json' -v -X GET http://127.0.0.1:3333/api/posts?offset=10
```