First part from upcoming tutorial series for Total.js. Series will be focused on absolute basics of framework where you will learn best practices and common approaches of different situations and problems. In this part we will setup our Total.js app.
Tutorial series - #1 Introduction
First part from upcoming tutorial series for Total.js. The Series will be focused on the absolute basics of the framework, where you will learn best practices and common approaches to different situations and problems. In this part, we will set up our Total.js app.
What is Total.js?
Total.js is a full-stack Node.js framework for creating web applications, REST services, real-time applications, and much more. The framework is in development for more than eight years, it's fully open-source, and it's written in pure javascript.
Core features of Total.js:
- Web server
- Clustering
- Websocket (server & client)
- Handling of static files (upload & download)
- NoSQL embedded database (TextDB)
- SMTP sender
- Components
- File storage
- Workers
- Number, String, Date, and Array prototypes
Project structure
Try to always follow Total’s directory structure for better readability and orientation in your application. Start script for every Total app is index.js
, and the file for configuration of your app is config
. Both are located at the root of your app. Learn more about configuration.
Below are some main Total’s directories with short usage description:
- Builds - Directory for Total.js Application Builder scripts
- Controllers - For declaring routes for your application
- Definitions - Scripts for overwriting or adding Total’s functionality
- Private - You can store here your scripts or certificates
- Public - Anyone can access this folder outside this app
- Schemas - Are for handling and processing received data, mostly from controllers
- Views - Total’s view files for rendering
All lists of directories and files can be founded in our documentation
Setup
Local
Download Total.js, our starting template from GitHub, run npm install
, and after that run node index.js
command inside the root of your project. You can find more templates that fit your needs here.
Cloud
A more straightforward, practical, and efficient way is to use our Rapid Cloud Development with app management tool SuperAdmin, Code editor with full support for Total.js, and many other additional features for more accessible and smoother development.
Step-by-Step guide
- Sign in to Total.js Platform
- Pick a container that fits your needs
- Select apps you want to install (Don't forget Code app so you can edit your apps)
- Open SuperAdmin by clicking "Super Admin" on your new container
- Create your first app:
- In the upper-right corner click Add
- You can change the internal name of the app or customize some settings
- Click submit button and wait until the following form appear
- Select source-code for your application (or use our templates)
- Click submit button
- Open your code app in your SuperAdmin
- Select your app in the upper-left menu
- Start coding
You can learn more about the Total.js platform and our other projects on our official site.
Other posts from Total.js Platform
- 2024-11-13Benchmarking Node.js Frameworks: selecting your framework for 2025!
- 2024-11-01October report 2024
- 2024-10-22Performance Testing: Total.js vs. NestJS
- 2024-10-01September report 2024
- 2024-09-27Total.js UI Builder: #2 designing your first interface
- 2024-09-26Total.js V5: Middlewares
- 2024-09-23Beginner Guide to Total.js UI: # 05 Client-side routing
- 2024-09-23Total.js UI #4: Data Binding (Part 2 – Practical Example)
- 2024-09-20Introduction to Total.js UI Builder: A Beginner’s Guide
- 2024-09-13Total.js v5: #06 Understanding File Routing