empirica

package module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

Empirica v2

Empirica v2 is currently released and ready for creating experiments. We will be supporting Empirica v1 until December 2022.

Requirements

The current requirements for v2 are:

We are working to lower requirements.

Installation

Run the installation script:

curl https://get.empirica.dev | sh

To update, run the command again.

Getting started

empirica create my-project
cd my-project
empirica

The server will have started, and go to http://localhost:3000 to get started. Go to http://localhost:3000/admin to access the admin, the credentials are in .empirica/empirica.toml.

Documentation

Index

Constants

View Source
const DefaultStoreFile = settings.EmpiricaDir + "/local/tajriba.json"

Variables

This section is empty.

Functions

func ConfigFlags

func ConfigFlags(cmd *cobra.Command) error

ConfigFlags helps configure cobra and viper flags.

Types

type Config

type Config struct {
	Name       string            `mapstructure:"name"`
	Server     *server.Config    `mapstructure:"server"`
	Player     *player.Config    `mapstructure:"player"`
	Callbacks  *callbacks.Config `mapstructure:"callbacks"`
	Tajriba    *tajriba.Config   `mapstructure:"tajriba"`
	Log        *logger.Config    `mapstructure:"log"`
	Production bool              `mapstructure:"production"`
}

Config is server configuration.

func (*Config) Validate

func (c *Config) Validate() error

Validate configuration is ok.

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner manages Empirica's running state.

func Start

func Start(ctx context.Context, config *Config, usingConfigFile bool) (*Runner, error)

Start sets up the Empirica environment and creates an HTTP server.

func (*Runner) Close

func (r *Runner) Close(ctx context.Context)

Close waits for empirica to be done.

Directories

Path Synopsis
cmds
internal
server
Package server handles the GraphQL HTTP server.
Package server handles the GraphQL HTTP server.
utils/log
Package log configures the logging system.
Package log configures the logging system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL