bhumijgupta / calendar-view

Simple backend for user to view upcoming calendar events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calendar-View

A simple backend api to view upcoming calendar events and send calendar invites.
Total alerts Language grade: JavaScript docs-shield

Documentation

The api docs are generated using apidocs. The full documentation is hosted here

Generate docs

To generate docs manually, run

sudo npm i -g apidocs
apidocs -i routes -o docs

Try Online

The frontend is deployed on gh-pages. Have fun 😎

Run Locally

Running backend

1. Setup Google apis

Setup Google project, and create a consent screen with callback to https://<server-origin>/auth/callback. Setup credentials and enable Google Calendar API

2. Setup .env file

Rename .env.example to .env and populate values from previous step

3. Setup RSA keys

These keys will be used for assymmetric signing of JWT. First create directory.

mkdir auth-keys && touch private-key.pem && touch public-key.pem

Generate RSA keys (preferable 512 bits). You can use this site.
Paste the content to the respected key files.

4. Running server

Finally, the awaited step npm run start

Running frontend

The frontend are static html files. They can be served using any web server. For convenient use, we'll use serve.

# Install serve globally
sudo npm i -g serve
# Serve the frontend
cd frontend && serve

Note: If you use any other webserver, point FRONTEND_URI in .env file to the frontend URL.

Linting

The project uses eslint and prettier to lint the files.The configuration files are .eslintrc, .eslintignore and .prettierignore.
You can manually lint code using

npm run lint

Author

forthebadge

Bhumij Gupta

GitHub followers LinkedIn Twitter URL


if (repo.isAwesome || repo.isHelpful) {
  StarRepo();
}

About

Simple backend for user to view upcoming calendar events


Languages

Language:JavaScript 71.8%Language:HTML 19.2%Language:CSS 8.1%Language:Shell 0.8%