https://github.com/konradlinkowski/scricher
NodeJS + Express server for a Twitter-like app. User authentication.
https://github.com/konradlinkowski/scricher
authentication backend express mongodb passport server
Last synced: 3 months ago
JSON representation
NodeJS + Express server for a Twitter-like app. User authentication.
- Host: GitHub
- URL: https://github.com/konradlinkowski/scricher
- Owner: KonradLinkowski
- License: mit
- Created: 2017-10-22T13:36:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-11T17:03:58.000Z (over 5 years ago)
- Last Synced: 2025-10-05T18:41:26.930Z (9 months ago)
- Topics: authentication, backend, express, mongodb, passport, server
- Language: JavaScript
- Homepage: http://scricher.herokuapp.com/
- Size: 185 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scricher
Node.js/express social media service.
## Features
Create your own account.
Log in to your account.
Write a post.
Comment others posts.
## Running
Use postman to send requests with x-www-form-urlencoded.
To access endpoints which require authorization, you need to pass:
Authorization JWT _access_token_
Inside Headers tab.
### Remote
Use my remote server on heroku:
https://scricher.herokuapp.com/
### Local
Clone repository and run it yourself.
Remember to add config/keys.js file containing mongodb and jwt string!
```bash
$ git clone https://github.com/KonradLinkowski/Scricher
$ cd Scricher
$ npm install
$ npm start
```
## Endpoints
### POST /api/auth/signup
#### Request
```
email _your_email_
password _your_password_
```
### POST /api/auth/signin
#### Request
```
email _your_email_
password _your_password_
```
#### Response
Access token.
### GET /api/posts/
#### Response
List of posts.
### POST /api/posts/
#### Request
```
message _your_message_
```
### GET /api/posts/:id
#### Response
Post specified by id.
### GET /api/comments/:id
#### Response
Comments on the post.
### POST /api/comments/:id
#### Request
```
message _your_message_
```
### GET /api/user/:id
### Response
Post created by user specified by id.
## Dependencies
* Node.js
* express
* async
* bcryptjs
* mongoose
* jasmine
* passport
* passport-jwt