A web application that integrates with Google Sheets API to store and manage tasks.
- OAuth 2.0 authentication with Google
- Write data to Google Sheets
- Environment variable configuration for secure deployment
- Node.js (v14 or higher)
- npm
- Google Cloud Platform account with Google Sheets API enabled
- Google OAuth 2.0 credentials
-
Clone the repository
git clone <your-repository-url> cd sheeter_project -
Install dependencies
cd server npm install -
Set up environment variables
- Create a
.envfile in the server directory with the following variables:
PORT=3000 GOOGLE_SHEET_ID=your_google_sheet_id - Create a
-
Start the development server
npm run dev
- Create a GitHub repository
- Go to GitHub and create a new repository
- Initialize your local project with Git and push to GitHub:
git init git add . git commit -m "Initial commit" git branch -M main git remote add origin <your-github-repo-url> git push -u origin main
Render is a cloud platform that offers free hosting for web services.
-
Sign up for a Render account
-
Create a new Web Service
- Connect your GitHub repository
- Configure the service:
- Name: sheeter-project
- Environment: Node
- Build Command:
cd server && npm install - Start Command:
cd server && npm start
-
Add environment variables
- Go to the Environment section and add:
PORT: 10000 (or let Render assign one)NODE_ENV: productionGOOGLE_SHEET_ID: your_google_sheet_idREDIRECT_URI: https://your-render-app-name.onrender.com/oauth2callback
- Go to the Environment section and add:
-
Deploy the service
-
Install the Heroku CLI and login
npm install -g heroku heroku login -
Create a new Heroku app
heroku create sheeter-app -
Add a Procfile to the root directory
- Create a file named
Procfilewith the content:
web: cd server && npm start - Create a file named
-
Configure environment variables
heroku config:set NODE_ENV=production heroku config:set GOOGLE_SHEET_ID=your_google_sheet_id heroku config:set REDIRECT_URI=https://your-heroku-app-name.herokuapp.com/oauth2callback -
Deploy to Heroku
git push heroku main
-
Never commit sensitive files to GitHub
- OAuth credentials (client_secret*.json)
- .env files with API keys or secrets
-
Update Google OAuth settings
- Add your production redirect URI to the authorized redirect URIs in Google Cloud Console
- For example: https://your-app-domain.com/oauth2callback
- If authentication fails, check that your redirect URI is correctly configured both in your app and in Google Cloud Console
- For deployment issues, check the logs of your hosting provider
ISC