Calendar-View
A simple backend api to view upcoming calendar events and send calendar invites.
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
.env
file
2. Setup 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
Bhumij Gupta
if (repo.isAwesome || repo.isHelpful) {
StarRepo();
}