sleepy

command module
v0.0.0-...-696a884 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2014 License: MIT Imports: 22 Imported by: 0

README

Sleepy, the lightweight web application framework

Introduction

Sleepy is a web application framework with a client - server architecture and a lightweight approach. It attempts to provide the bare essentials for building a web application, is opinionated but tries to keep its conventions at a minimum.

This repository contains the server part of Sleepy, written in Go, which runs as a daemon and is in general never directly used. For more information on the Sleepy client, written in PHP, check the corresponding repository.

Be aware that this is alpha software, and as such may crash your computer/eat puppies/hide your socks. However, I have been running Sleepy on my own servers for the past year, with uptime of months at a time, and have encountered no serious issues. I still can't match a pair of socks, though.

Building Sleepy

Assuming you already have all the dependancies required for building Sleepy via go get, it's simply a matter of running make in the root directory. Installing Sleepy requires running make install, for installing the binaries, and make install-data for installing the configuration files and SQLite database. Alternatively, you can run make package to build a package you can then redistribute.

For ArchLinux users, there exists a PKGBUILD file you can build directly in its directory via makepkg. This sets up Sleepy to run as a restricted "http" user by default, which should be safer if things go south. It also installs a service file for systemd under the name "sleepy".

Init files exist for Debian init, SysV init (Fedora, CentOS etc.) and systemd.

Running/Configuring Sleepy

Sleepy installs its configuration files in "/etc/sleepy", in a common .ini format. Most defaults are fine, though you will most likely need to change the address for the http server, as well as the username/password used for your database.

Running Sleepy is simply a matter of running the sleepyd binary, installed in "/usr/bin" by default, though running through an init file is probably better.

Anything else?

Sleepy is not of much use alone, so you most likely want to set up the client framework. For help, check the Sleepy client's repository.

License

The server part is licensed under the MIT license. The client part is licensed under seperate tems, check the corresponding repository for more information.

Documentation

Overview

Package main is the constitutes the starting poing for Sleepy. It contains code for setting run-time options and some setting up the operation of the server.

Directories

Path Synopsis
core
config
Package config implements configuration file support for Sleepy.
Package config implements configuration file support for Sleepy.
server
Package server contains the core server functionality for Sleepy, including the RPC service, the embedded HTTP server for files uploaded via Sleepy, and an FTP server, containing a subset of functionality required for uploading files to Sleepy in an efficient manner.
Package server contains the core server functionality for Sleepy, including the RPC service, the embedded HTTP server for files uploaded via Sleepy, and an FTP server, containing a subset of functionality required for uploading files to Sleepy in an efficient manner.
user
Package user contains functionality for querying, adding and removing users, or consumers of services provided by modules via RPC.
Package user contains functionality for querying, adding and removing users, or consumers of services provided by modules via RPC.
modules
auth
Package auth provides methods for generating and validating passwords for consumption via RPC.
Package auth provides methods for generating and validating passwords for consumption via RPC.
database
Package database provides methods for querying an SQL database through a stable interface.
Package database provides methods for querying an SQL database through a stable interface.
email
Package email provides methods for sending email messages, with support for multiple To, Cc, Bcc fields, attachments etc.
Package email provides methods for sending email messages, with support for multiple To, Cc, Bcc fields, attachments etc.
file
Package file contains methods for uploading, retrieving and removing files efficiently and transparently via RPC.
Package file contains methods for uploading, retrieving and removing files efficiently and transparently via RPC.
image
Package image contains methods for manipulating images, including resizing, cropping etc.
Package image contains methods for manipulating images, including resizing, cropping etc.
template
Package template contains methods for rendering templates and accompanying i18n definitions via RPC.
Package template contains methods for rendering templates and accompanying i18n definitions via RPC.
user
Package user contains methods for retrieving, adding and removing users, or API consumers, to Sleepy, via RPC.
Package user contains methods for retrieving, adding and removing users, or API consumers, to Sleepy, via RPC.

Jump to

Keyboard shortcuts

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