Questions tagged [total.js]

total.js is a Web application framework for node.js

Total.js Platform


About

Total.js framework was written in 2013 from scratch. The main idea of the framework is to be complex, stable and without dependencies. Total.js Platform is a collection of libraries, packages and complete products in the most cases written in Total.js framework.


Links

The framework feature list

  • Amazing server-side and client-side solution with no dependencies
  • Low CPU and memory requirements, e.g. works on ARM architecture
  • Built-in small NoSQL embedded database with great analytics tools and incredible performance
  • Supports WebSocket and Server-Sent events
  • Supports auto-compression for all .js, .html and .css
  • CSS supports auto-vendor-prefixes, variables and nested selectors
  • Full web server with serving of static files and with GZIP compression
  • Supports SMTP mail sender
  • Supports great View Engine (conditions, loops, localization, etc.)
  • Supports localization
  • Supports media streaming
  • Supports workers for heavy CPU operations
  • Supports themes
  • Built-in a lot of helpers for String, Number, Array and Date types
73 questions
0
votes
1 answer

save data in array nested on database nosql - Total.js

i have to save a json in array but i can't in controllers/api.js exports.install = function() { F.cors('/api/db/*',['post'],false) F.route('/api/db/',saveNoSql,['post']); }; function saveNoSql(){ console.log('dentro saveNoSql'); …
0
votes
2 answers

Now error is change cookie parser install but when I command node app it gives error "cookie-parser not found"

My node version 8.3.0, npm -v 5.3.0, Express. Error module.js:491 throw err; ^ Error: Cannot find module 'cookie-Parser' at Function.Module._resolveFilename (module.js:489:15) at Function.Module._load (module.js:439:25) …
0
votes
1 answer

Using F.worker2 with Total.js

I would like to use some args with F.worker2. Do you have some example ? How to use the F.worker2 with Total.js ? Thank you
Julien
  • 249
  • 2
  • 9
0
votes
1 answer

How to rewrite Cache-Control header?

Trying to rewrite Cache-Control header with self.header('Cache-Control', 'max-age=86400,public'); self.view('view'); It doesn't work. Header still the same - Cache-Control: private. Also tried to append headers to view function: self.view('view',…
Serge Rosenberg
  • 196
  • 2
  • 5
0
votes
1 answer

Integrating Opbeat with Totaljs

I would like to use Opbeat with Totaljs. Do you have an idea how to use this tool with Total? Thank you
Beta
  • 5
  • 2
0
votes
1 answer

Total.js Custom System View

I would like to use controller.view500(err) and display a custom system view. How to display a custom system view 500, 400 ? https://docs.totaljs.com/latest/en.html#api~FrameworkController~controller.view Thank you
Beta
  • 5
  • 2
0
votes
1 answer

nosql model creation, trying to build a product schema with variable product options

I downloaded and installed "Totaljs Eshop" and noticed that the product creation does not allow me to define product options (ie, color of product). I went into the NoSQL embedded database, and looked at the models/product.js file. I…
0
votes
1 answer

how can I change databases/files-binary path?

I want to create an asar file (I want to install my total.js web app in client pc, so I want to package with electron like an asar file) I need to redirect every directories have dynamic files like databases\files-binary. So, how can I do that? I…
0
votes
1 answer

How to serve and browse static folder with html files without using layout

I'm building a website based on a bought theme. I want to serve the theme folder so my customer can have a look at the unmodified version of theme and choose components. With express, i can do this : var express = require('express'); var app =…
Mat'arangéÇa
  • 174
  • 1
  • 13
0
votes
1 answer

Total.js wait for event in localization

trying to wait for async call in total.js for localization. However, when I do try to make localization.js part wait for the response, program continues and selects language 'en' automatically. The code below is not taking care of async process, but…
Semih Korkmaz
  • 1,125
  • 13
  • 26
0
votes
1 answer

Total.js define view location

This may be a silly question but I couldn't find a way to change the default views location in total.js. Is it possible?
Andrei Stalbe
  • 1,511
  • 6
  • 26
  • 44
0
votes
1 answer

Simple email duplicate submission Node.js

I have been working on a simple duplicate email submission, here it is: var filter = function (o) { // o.email query - already submitted query a@a.com return o.email === email; // passing a@a.com or awe@awe.com }; db.one(filter,…
Xdrone
  • 781
  • 1
  • 11
  • 21
0
votes
1 answer

Totaljs FrameworkWebSocket Client

I would like to use websockets to send updates from the server to the clients. I know I can use Server Sent Events but Internet Explorer doesn't have great compatibility with it so I prefer to use websocket. The TotalJs WebSocket allow me to use it…
Victor Santos
  • 350
  • 1
  • 4
  • 14
0
votes
1 answer

Pretty routing with total.js (like 'base_url/@username')

I'm new to node.js, have been using Ruby and RoR. I'd like to show a view for user view with a pretty routing. In Rails, I can handle with code like this: get '@:username' => 'users#show' So I tried in Total.js as same, but error appeaerd with 404:…
Nyeong
  • 3
  • 1
0
votes
1 answer

Is there a way in Total.js to add to @{head} from a view?

I'm using total.js and wanting to add a page-specific CSS link tag to a page's HTML from within a view, rather than coding it into the route's controller. I've tried to use @(head(css('page.css'))} but that results in a server error. Using…
AErez
  • 1
  • 1