Giter Site home page Giter Site logo

guifreribas / caninclude Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cyberlight/caninclude

0.0 0.0 0.0 2.66 MB

CAN I INCLUDE one TAG to ANOTHER? WHAT IS A QUESTION! Yorik (c) :)

Home Page: https://caninclude.glitch.me

License: MIT License

JavaScript 60.04% CSS 39.33% Dockerfile 0.63%

caninclude's Introduction

CAN I INCLUDE

This project provides functionality to test whether one tag can be included in another. Based on information from HTML Spec WHATWG

Please, see Demo here

Development environment

  • VSCode
  • VSCode Remote Containers
  • Clone git clone https://github.com/CyberLight/caninclude
  • Go to cloned project repo folder cd caninclude
  • Open in VSCode code .
  • In popup menu click by Reopen in Container
  • Whew!

Setup spec.json for app

  • npm run crawl - this command crawl html spec page and make json data for app

How to run app in development

  • npm run dev - this open app using nodemon
  • Go to url http://localhost:3000 in your browser
  • That's all!

How to run app in production

  • Need to set env variables from Environment variables section
  • npm start - this command launch an app using pm2 using ecosystem.config.js

Environment variables

  • COOKIE_KEY - a key for sign cookies type: String
  • FEEDBACK_DAILY_LIMIT - a limit count of feedbacks daily type: Integer
  • RECOMMEND_CLEAR_CACHE_CRON_TIME - string in cron time format. Default value: 0 */30 * * * * (every 30 minutes)
  • MAIN_PAGE_DECORATION_TYPE - main page decoration mode or type type: String, possible values:
    • NY_LIGHT_RIBBON
  • LOGO_URL - URL of the logo file to be included in the src attribute of the img element
  • LOGO_ALT - text for alt attribute of img element

Project structure

  • .data - a folder for sqlite database
  • .devcontainer - a folder with VSCode Remote Containers configuration
  • components - a folder with server components that was written in Preact.
  • scripts - a folder with helper scripts for a project
  • crawl.js - a script for crawling html spec page
  • ecosystem.config.js - a configuration file for pm2
  • nodemon.json - a configuration file for nodemon
  • server.js - main and huge file which contains all routes and logic for an app
  • specfix.js - a script for making some additional json data transformations
  • utils.js - file with helper data managers and helper functions

Project routes that are important

  • / - Main page with some counters by usage of app and results for each tags
  • /can/include?parent=&child= - renders page with full information and result of ability to include one tag into another
  • /admin/feedbacks - ui for manage and view feedbacks
    • For ability to access to this route, you need:
      • npm run gen:invite role=admin
      • This script will output url like this: /invites/81493f1f9a306f64417b91960f6ded3b/apply
      • Go to your browser and concatenate http://localhost:3000 and /invites/81493f1f9a306f64417b91960f6ded3b/apply and press Enter
      • After that you can access to /admin/feedbacks

License

See the LICENSE file for license rights and limitations (MIT).

caninclude's People

Contributors

cyberlight avatar dependabot[bot] avatar

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.