empirica

package module
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

Empirica v2

Contributor Covenant

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

Installation

Empirca v2 is currently has only been tested on macOS, but should work on Linux and Windows with WSL2.

Run the installation script:

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

To update, run the command again.

Quick Start

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.

Head over to https://docs.empirica.ly for more information.

Contributing

Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here CONTRIBUTING.md.

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