Rellit allows you to ask questions and reply to questions anonymously. You will see questions closest to you, so only the most relevant ones. Think asking a question is too slow? Head over to the live chat and chat in real time, lightning speed.
Built by: Raymond, Sal, Desmond, Qingyuan - Google SPS Team 52 Summer '22
- Clone this repository
git clone <repo-link>
- Navigate Inside the Repo with
cd rellit
- Run
npm install
to install all dependencies specified inpackage.json
- To run the server locally, do
nodemon index.js
nodemon
allows saves any updates you make automatically without needing to re-run the server- if you are fine with manually re-running the server each time, you can run
node index.js
- Click on "Web Preview" near the top-right corner and "Preview on Port 8080"
- Ready to deploy? Run
gcloud app deploy
- you will get an error if you do not configure your project. Set the project with
gcloud config set project summer22-sps-52
- new indices may be required to run complex queries, such as the one below:
const queryGetReplies = datastore.createQuery("Reply")
.filter("questionId", "=", questionId)
.order("time", {
descending: true
});
- If you get a
FAILED_PRECONDITION
error, copy and paste the suggested index code intoindex.yaml
- For the above example, the required configuration is:
- kind: Reply
properties:
- name: questionId
- name: time
direction: desc
- To reflect these changes in Datastore, run the following command, making sure you're in the same directory as
index.yaml
gcloud datastore indexes create index.yaml
- Navigate to the Datastore console and wait a few minutes for the index changes to be reflected
- To learn more about how indices work check out the Index Configuration documentation
- It's a good idea to create a dev environment to
- test the code prior to running
gcloud app deploy
- Understand why your code is getting 500 errors in production
- test the code prior to running
- Run the following command to initialize a dev environment that listens on port 8080 by default:
gcloud beta code dev
- This article might have useful info on an unable to detect project Id error
Node.js
andExpress.js
backend- Google Datastore - NoSQL database to store questions and replies
ejs
template engine- Bootstrap
- Google Maps API
Firestore
backend for live chat feature
- When in development, each time you refresh the server (including auto-refresh by nodemon), the session will terminate
- a new session must be started again by signing into Google