Coder Social home page Coder Social logo

adildsw / surve-a-story Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 116.85 MB

:scroll: Surve-a-Story is a server-based customizable survey/form application capable of serving interactive stories and puzzles.

License: GNU General Public License v3.0

JavaScript 33.10% EJS 66.90%
serving-interactive-stories puzzles survey-tools escape-room

surve-a-story's Introduction

Surve-a-Story

๐Ÿ“œ Surve-a-Story is a server-based customizable survey/form application capable of serving interactive stories and puzzles.

Getting Started

The following instructions will help you get this system up and running in your local system.

Prerequisite

Before proceeding to the installation, make sure that your system contains Node.js.

Install Node.js

Compiling Source

Once all the prerequisites are installed, run the following commands on the terminal to compile the source code on your system:

1. Clone Source from GitHub

git clone https://github.com/adildsw/surve-a-story/

2. Install Project Dependencies

cd surve-a-story
npm install

Hosting the Server

If the source is compiled successfully without any errors, follow these steps to host the Node.js server:

Node.js Server

In a new terminal, navigate to surve-a-story folder. Then run the following command:

node app.js

Upon successful Node.js server hosting, the terminal should return the following message:

 Server Running at Port 8888

Launching the System

Once the server is hosted and running, open your browser and navigate to http://localhost:8888/. Enjoy!

Crafting a Custom Escape Room

This involves modifying the story.json file. More details on the templating system will be updated soon.

surve-a-story's People

Contributors

adildsw avatar edlongman avatar hemanthgoalla avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

edlongman

surve-a-story's Issues

Using the request.body.itemCode cannot be trusted

in app.js the var itemCode = request.body.itemCode is never verified that it matches the current storyIdx.

Therefor, two tabs can be used to skip questions without the correct answer.

For example:
Tab 1: Navigate to question 1.
Tab 2: Navigates normally to question 3.
Tab 1: Answer question 1, but it moves user to question 4

Suggested fix

Test before incrementing storyIdx
Like so:

          if(itemCode == story["sequence"][sess.storyIdx])
               sess.storyIdx++

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.