https://github.com/nylas/nylas-api-demo
An example application that consumes the Nylas API.
https://github.com/nylas/nylas-api-demo
Last synced: 6 months ago
JSON representation
An example application that consumes the Nylas API.
- Host: GitHub
- URL: https://github.com/nylas/nylas-api-demo
- Owner: nylas
- Created: 2018-05-25T20:51:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-06-09T14:49:00.000Z (over 2 years ago)
- Last Synced: 2025-06-07T12:06:39.231Z (7 months ago)
- Language: JavaScript
- Size: 661 KB
- Stars: 5
- Watchers: 65
- Forks: 8
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nylas API Demo App
The Nylas email & calendar APIs power applications with email and scheduling features from any inbox in the world. The demo app is live at [https://nylas-sales-demo.herokuapp.com/]( https://nylas-sales-demo.herokuapp.com/), contact sales@nylas.com for a demo!
## How to run the Backend
The server code was developed on Python 3.6.5
### Download, create and activate your virtual environment:
```
pip3 install virtualenv
virtualenv .venv --python=python3
source .venv/bin/activate
```
### Install python dependencies:
```
pip3 install -r requirements.txt
pip3 install .
```
### Install react/js dependencies:
```
yarn install
```
### Create database and tables:
`nylas_demo create_tables`
### Seed database with user data:
`nylas_demo add_user `
Please see our [API documentation](https://docs.nylas.com/reference#authentication) on hosted and native authentication for information on how to authenticate new users, and receive access tokens.
To use the API without implementing authentication, visit the [Nylas Dashboard]( https://dashboard.nylas.com/sign-in) and register for a developer account. After you have registered, you can click 'Auth Account' to sync a new email account, and get your access token.
### Export environment variables
If you plan on using webhooks, the app will need your client secret in order to verify incoming webhooks. You can find your secret in the [Nylas Dashboard]( https://dashboard.nylas.com/sign-in) in the Dashboard view. Click the eye icon beside App Secret to copy/paste.
`export NYLAS_OAUTH_CLIENT_SECRET=`
### Run:
`flask run`
### Lint:
`mypy api --ignore-missing-imports`
### Test:
`pytest -v`
## How to run the Frontend
### Run:
`yarn start` runs the front-end at [http://localhost:3000](http://localhost:3000)
### Lint:
`npm run flow`