Skip to content
/ osop-api Public

The REST API of OSOP, an open source software for conducting polls and surveys with a special focus on data minimization and user privacy πŸ“Š

License

Notifications You must be signed in to change notification settings

DROSL/osop-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alexander Ziemke
Dec 2, 2022
c8d2e7d Β· Dec 2, 2022

History

75 Commits
Nov 27, 2022
Jan 2, 2022
Nov 27, 2022
May 15, 2022
May 19, 2022
Nov 27, 2022
Dec 2, 2022
Dec 28, 2021
Dec 31, 2021
May 15, 2022
Nov 27, 2022
Dec 20, 2021
Apr 5, 2022
Nov 27, 2022
Dec 2, 2022
Dec 2, 2022
Jan 2, 2022
Dec 28, 2021
Dec 2, 2022
Nov 27, 2022

Repository files navigation

OSOP API

Our Simple Open Poll (OSOP) is an open source web application for conducting polls and surveys with a special focus on data minimization and user privacy. It does not collect personal data, does not set tracking cookies, and does not outsource the service to third-party solutions, but runs entirely on your own server.

Install

  1. Clone the repository:
git clone https://github.com/DROSL/openpoll-api
  1. Install required modules:
npm install
  1. Install the MongoDB server.

  2. Create an upload folder for user files, like uploads/.

Configuration

Environment variables

Set the following environment variables:

Name Type Description
NODE_ENV string Indicates whether the server is running in development or production mode.
PORT or API_PORT number The port on which the server listens.
MONGODB_URI string The URI of the MongoDB instance to connect to. (Read more)
SESSION_SECRET string The secret used to sign the session ID cookie. Sould be a random set of characters. (Read more)

Note: You can use a .env file to set the environment variables. See .env.sample as example.

Config files

The config files are located in the config/ directory and are loaded depending on the NODE_ENV environment variable. default.json is always used as fallback. The following parameters can be configured:

{
	"path": "/",
	"cookie": {
		"secure": true,
		"httpOnly": true
	},
	"upload": {
		"dest": "uploads/",
		"limits": {
			"fileSize": 104857600
		}
	}
}

Usage

Run the server with:

npm start

Testing

Import postman.json to Postman.

Documentation

Please see the documentation.

License

Please see the license.

Contributing

Before you commit, run:

npx prettier --write .

About

The REST API of OSOP, an open source software for conducting polls and surveys with a special focus on data minimization and user privacy πŸ“Š

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published