Skip to content

A simple library that transforms JavaScript into a better platform. This package is great to add for beginners!

Notifications You must be signed in to change notification settings

JustAnEric/NodeCDN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

NodeCDN

A simple library that transforms JavaScript into a better platform.

Installation

  • For client sides: <script class="nodecdn-init" src="https://hostereric.herokuapp.com/NodeCDN/index.min.js"></script>
  • For backend: Go down to the backend section.

Initialising on the backend

  • Python (Flask): pip install nodecdn or use your Package Manager to search for nodecdn.

For standalone installs:

  1. Download the latest ZIP file from Releases
  2. UnZIP, then move to your website's asset directory
  3. Initialise it like in this example here (change the src to your corresponding path): <script class="nodecdn-init standalone" src="assets/NodeCDN/init/index.min.js"></script>

Start coding

  • To initialise in JavaScript, copy and paste this code into your script file:
nd = new Node(); //initialise the NodeCDN minimal js script
nd.Client('key'); //initialise the client

Init();
  • To initalise in Python, copy and paste this code into your script files:
# This is the file where your Flask server will be

from flask import Flask
from nodecdn import backend, frontend

app = Flask('app')

@app.route('/')
def index(): return "home"

backend.init(app);
app.run()
<!--Put before closing body tag -->
<script src="nodecdn/dist"></script>
<script>

</script>

After you have done this, you can read our docs here: https://nodecdndocs.readthedocs.io

About

A simple library that transforms JavaScript into a better platform. This package is great to add for beginners!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages