HPI Schul-Cloud API Requirements
Research of Caldav Modules for Node
PostgreSQL/bin/* folder must be accessable through shell/cmd (check environment variables) for this install guide to work. Check functionality with psql --version
for example.
- Clone repository
- Install & start PostgreSQL, set and remember
postgres
user password during install - Create a user
node
, without password:createuser -U postgres --superuser --login node
- Create a database named
schulcloud_calendar
:createdb -U postgres schulcloud_calendar
- Connect to it:
psql -d schulcloud_calendar -U postgres
(Prompt will change toschulcloud_calendar=#
) - Grant user with
all
permissions for the db:grant all privileges on database schulcloud_calendar TO node;
(Feedback should be:GRANT
) - Install uuid-ossp (install info) extension:
CREATE EXTENSION "uuid-ossp";
Feedback should be:CREATE EXTENSION
- Quit psql-Interpreter with Ctrl+C (or open new command prompt) and run
npm install
- Import DB data: view below
- Run node:
npm start
for production environmentnpm run start_local
for local unix environmentnpm run start_local_win
for local windows environment
Alternative install instructions here: Kalender Setup
If you get fe_sendauth: no password supplied
errors on commands, edit your [installdir]\data\pg_hba.conf
and set METHOD
to trust
in all lines.
- Create tables with
psql -U node -d schulcloud_calendar -a -f schema.sql
- Insert example data using
psql -U node -d schulcloud_calendar -a -f example_data.sql
- Create a database named
schulcloud_calendar_test
and setup as described above - Create tables with
psql -U node -d schulcloud_calendar_test -a -f schema.sql
- Run
npm test