Giter Club home page Giter Club logo

evote-app's Introduction

evote-app

Online voting App using basic nodejs, express and openPGP for encryption.

Testing

  1. First you need to install mongodb server in you machine

    • ๐Ÿคญ By the way you can Fork ๐Ÿธ and star ๐Ÿ’“ โญ the repo
  2. Install NodeJs version > 10. Though, NodeJs LTS version 14 is recommended.

  3. Clone the repo using one of the two methods:

      # Using https link
      git clone https://github.com/faouziMohamed/evote-app.git
     # Or using the ssh link
     git [email protected]:faouziMohamed/evote-app.git
  4. Change directory to evote-app and install dependencies:

      cd evote-app
    • Install dependencies using npm

      npm install
    • Or using yarn

      yarn
  5. For testing purpose create a file called .env in the root of the project (evote-app) and paste the following content:
    This file will not be stagged into Git, Keep it only localy. Note that random secret bellow are generated using nanoid

      PORT = 3000
      APP_NAME = 'evote-app'
      DB_URL_DEV = 'mongodb://localhost:27017/evote-app'
      # Change the uri bellow with a mongo cloud atlas uri for production  
      DB_URL_PROD = 'mongodb://localhost:27017/evote-app'
      SESSION_EXPIRY = 1296000000
      SESSION_MAXAGE = 1296000000
    
      SERVER_NAME = 'Web Server in node'
      SERVER_EMAIL = '[email protected]'
      SERVER_PASSHPRASE = 'U2FsdGVaJunkyRanDomSECRETuP'
    
      COCENTER_NAME = 'Counting Center'
      COCENTER_EMAIL = '[email protected]'
      COCENTER_PASSHPRASE = 'CPutHere A RANDOM SECRET9yfDbhnBm51kSNpkL'
    
      VALIDATION_CENTER_NAME = 'Validation Center'
      VALIDATION_CENTER_EMAIL = '[email protected]'
      VALIDATION_CENTER_PASSHPRASE = 'your RANDOM SERCER HERE plLrtFj2T7S'
    
      PASSPHRASE_KEY = 'RANDOMw22PiTFHSECRET0vQdZzUHQvIR98OWbVwpw9qZT_h'
      SESSION_SECRET='cZk_slfK84QiDDo-vMARANDOM SECRET CODElKJRUs-v7QbxUW-4'
  6. Then run tests on local typing:

    npm - yarn
    npm run dev Or yarn dev
  7. Open in your browser the url http://localhost:3000 to see result

๐Ÿ†— That's it!!!

LICENSE MIT

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.