Giter Site home page Giter Site logo

cloakedninjas / secret-santa Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 7.0 677 KB

Secret Santa app. Sign up, get emailed a person to buy a gift for. Provide gift ideas and set a budget.

JavaScript 70.58% SCSS 8.41% EJS 21.02%
secret-santa xmas javascript express-js

secret-santa's Introduction

Secret Santa

About

This is an Express-based application that provides a simple form for users to sign up to a Secret Santa mailing group. The host can then login and send out the emails, one per person, telling each person who they need to buy a gift for.

Build Status: CircleCI

Installation

$ git clone https://github.com/cloakedninjas/secret-santa.git --depth 1

Usage

Copy or rename app/config/default.json to app/config/config.json to suit your needs. You should change the admin password as well as the default secrets for Session and Cookie storage.

Run the server using:

$ npm start

Config

title

Set the sub heading on the page

admin-password

The password to access the admin page located at /admin

deadline

Your chosen deadline, appears on the top left of the screen

spend-limit

Your chosen purchase allowance, appears on the top left of the screen

email-server

Currently only Send Grid (https://sendgrid.com/) is supported, sign up for a trial account to send free emails. Then paste your API key into the config

"email-server": {
    "type": "sendgrid",
    "from-address": "[email protected]",
    
    "options": {
      "api-key": "abc-123"
    }
}

cookie-secret

Used for Express's cookie parser middleware

session-secret

Used for Express's session middleware

Customizing

All templates (including the email) are stored in app/views, and are fully customizable.

  • layout.ejs is the main template
  • index.ejs is what users will see when they register

Other commands

npm run <cmd>

  • test runs tests
  • lint runs eslint over code
  • css build and minifies the CSS

secret-santa's People

Contributors

cloakedninjas avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

secret-santa's Issues

Problem with storage.json

Hi. Thank you very much for your neat app.

I tried to install it on a Ubuntu Server 14.04 on a VPS and I got the following error :

Error: ENOENT, no such file or directory '/var/www/html/secretnode/node_modules/secret-santa/app/lib/../../data/storage.json'
   at Object.fs.openSync (fs.js:432:18)
   at Object.fs.writeFileSync (fs.js:971:15)
   at new Store (/var/www/html/secretnode/node_modules/secret-santa/node_modules/json-store/index.js:5:32)
   at module.exports (/var/www/html/secretnode/node_modules/secret-santa/node_modules/json-store/index.js:34:10)
   at SecretSanta.addSubscriber (/var/www/html/secretnode/node_modules/secret-santa/app/lib/secret-santa.js:136:12)
   at app.post.res.render.error (/var/www/html/secretnode/node_modules/secret-santa/index.js:38:17)
   at Layer.handle [as handle_request] (/var/www/html/secretnode/node_modules/secret-santa/node_modules/express/lib/router/layer.js:82:5)
   at next (/var/www/html/secretnode/node_modules/secret-santa/node_modules/express/lib/router/route.js:100:13)
   at Route.dispatch (/var/www/html/secretnode/node_modules/secret-santa/node_modules/express/lib/router/route.js:81:3)
   at Layer.handle [as handle_request] (/var/www/html/secretnode/node_modules/secret-santa/node_modules/express/lib/router/layer.js:82:5)

This error happen when I click on submit.

The directory 'data' does not exist after I 'npm install secret-santa'. And there's no file called storage.json in the hierarchy... I also tried to 'chmod -R 777 secret-santa'.

Any ideas ?

'npm 1.4.21'
'node v0.10.25'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.