- Raul: rosterz
- Kevin: tgwang1023
- Ken: ChangweiXu
- Jacob: jacobazamora
- Jonathan: jxu495
- Laura: yifanyu123
The main idea of the QA app is to provide UCSB students with a new form of asking questions around UCSB. The QA app will allow students to submit questions so that other students who are (geographically) near by have to oppurtunity to answer their questions and earn points.
Link to Website: https://ucsb-cs56-qa.herokuapp.com/
- Go to Firebase Console and set up a new project.
- Select the new project and go to "Project Settings" -> "Service Accounts" -> "Firebase Admin SDK", copy the Java version of Admin SDK configuration snippet, and click "Generate new private key". <<<<<<< HEAD
- Rename the downloaded .json file to
firebase-auth.json
and move it tosrc/main/resource/static/auth/
directory. - Modify
static
field inDatabaseAPI.java
with copied contents:
// You can copy these code
private static final String authFileName = "target/classes/static/auth/firebase-auth.json";
// initialize database access
static {
try {
FileInputStream serviceAccount =
new FileInputStream(DatabaseAPI.authFileName);
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("<Your database address provided by firebase>")
.build();
FirebaseApp.initializeApp(options);
} catch (Exception e) {
e.printStackTrace();
}
}
- Save the change and now you can use
mvn spring-boot:run
to test the webapp inhttp://localhost:8080/
.
WARNING: Keep your private key safe and NEVER expose it to the public.