For Developers
Instructions for developers.
On this page
Local Testing
Backend
Required:
- MySQL v5.0.
- IntelliJ IDE.
- Java 11, or later.
Setup database:
- Clone backend repository from Github.
- Start MySQL.
- Import testing database from
externals/centralis_2_survey.sql
.
Setup server:
- Open folder with IntelliJ.
- IntelliJ automatically downloads maven dependencies according to
pom.xml
. - Navigate to
src/main/resources/application.properties
. - Change settings. In particular:
spring.datasource.url
if you have modified SQL ports, or used a different schema name.spring.datasource.username/password
server.port
to deploy server on a different port, defaultlocalhost:8080
Run server:
- Open folder with IntelliJ.
- Navigate to
src/main/java/edu.usc.marshall.centrallis22.Application
. - Click on
Run 'Application'
.
Frontend
Required:
- Node.js v12, or later.
- Tested on v12.22.12 and v18.12.1.
- Including bundled resources, i.e. npm.
Setup environment:
- Clone frontend repository from Github.
- Open terminal and navigate to folder.
- Use
npm i
to install dependencies. - Change socket connection uri at
config/socket.js
. - Change CSV download uri at
pages/session-results.js
.
Run:
- Start server. Wait for server to be ready.
- Use
npm run dev
to start NextJS app. - The default uri for the application is at
localhost:3000
.
Deployment
Placeholder: Requires instruction for server. In particular, how to import SQL files and set up ngix? and SSL for HTTPs and WebSocket.