# giflyst-backend

> Basic examples of the Spotify authorization flows through OAuth 2

Latest version **2.0.0** (published 2021-01-08) · 0 weekly downloads

## Install

```sh
npm install giflyst-backend
pnpm add giflyst-backend
yarn add giflyst-backend
bun add giflyst-backend
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-01-08 |
| First published | 2021-01-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | elayudhanira@gmail.com |
| Maintainers | elaelation |

## Links

- npm: https://www.npmjs.com/package/giflyst-backend
- npm.io page: https://npm.io/package/giflyst-backend

## Dependencies (5)

- [cors](https://npm.io/package/cors.md) ^2.8.4
- [express](https://npm.io/package/express.md) ~4.16.0
- [request](https://npm.io/package/request.md) ~2.83.0
- [querystring](https://npm.io/package/querystring.md) ~0.2.0
- [cookie-parser](https://npm.io/package/cookie-parser.md) 1.3.2

## Recent versions

- 2.0.0 (latest) — 2021-01-08

## README

# giflyst-backend

Spotify API Web Auth

Forked from https://github.com/spotify/web-api-auth-examples


### How to start

1. Clone this repository

2. Install package dependencies using `npm i`

3. Make sure to register application in Spotify developer's app https://developer.spotify.com/dashboard/applications

4. Setup local environment variable for node application using [dotenv](https://www.npmjs.com/package/dotenv)

5. Set your CLIENT_ID and CLIENT_SECRET 

6. On line `108`, FRONTEND_URI should point to the server of your application. If you clone from [Giflyst frontend](https://github.com/helloimela/giflyst), you should not change anything.

7. When everything is ready, run `npm start` and it will run the backend in `http://localhost:8888/`


### Deploy to heroku

1. From your command line, create heroku app.

```shell
heroku login
heroku create app_name
```

2. Create variables in your heroku app. [This is how to do it](https://devcenter.heroku.com/articles/config-vars).

3. Add variables for :

```
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
REDIRECT_URI
FRONTEND_URI
```

4. To deploy to heroku, make sure you have added your application in your own git repository.

```shell

git push heroku master

```

---
_Source: https://npm.io/package/giflyst-backend · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
