Como acessar minha API de backend

Preciso acessar minha API de backend em node para que a mesma envie emails com informação de um formulário de contato. Hospedei minha aplicação no King Host e aparece dessa forma o endereço da minha aplicação está mais ou menos assim a questão é que, como sou meio novato no node, não sei acessar a minha aplicação remotamente para fazer o encaminhamento dos formulários ja tentei utilizar ambos os endereços com o nome da rota no final exemplo: urldomeusite.com:num-porta/contato e urldomeusite.com/meusite/contato e não funcionou… Se alguém puder me ajudar fico bastante agradecido!

Why not program our video text terminals/terminal emulators to use something JSON or XML on the backend instead of ANSI escape sequences? [on hold]


Backstory (You can skip)

Awhile back I was developing a console toolkit for displaying debug messages and the like: enter image description here It gives me colour coding, blinking, underlines, bold, italic, etc.

While developing this library, I quickly learned that nesting with ANSI escape sequences was impossible, but assumed that good reasons existed why this was the case.

Of course working with other document types, nesting is more or less trivial:

<foo> the <bar> quick </bar> brown </foo> 

or with JSON

{         type=foo,         text=[                 "the",                 {type=bar, text="quick",},                 "brown",         ] } 

But with Ansi, its something like this:

\e[1m the \e[2m quick \e[1m brown 

giving an output like this:

enter image description here

Basically meaning that you would need to manually track the formatting, and explicitly construct escape sequences to represent all output moving forward. You can obviously make due, but it complicates things. Before complaining about this, I’d like to clarify what reasons exist that would necessitate an escape sequence model over say, a structured document style.

Questions:

Is it purely due to legacy reasons why displaying text on our video terminals is done with ANSI escape sequences and not another framework such as JSON, Yaml, XML, or something else?

Is ANSI escape sequences in video terminal, simply an old technology similar to say, X11 that sticks around solely due to how embedded it is within the computing paradigm?

If not, why don’t developers switch from an escape sequence style to something that would support nesting?

Are there any proposals to do away with ANSI escapes in terminals and replace it with something else?

Why not program our video text terminals/terminal emulators to use something JSON or XML on the backend instead of ANSI escape sequences? [on hold]


Backstory (You can skip)

Awhile back I was developing a console toolkit for displaying debug messages and the like: enter image description here It gives me colour coding, blinking, underlines, bold, italic, etc.

While developing this library, I quickly learned that nesting with ANSI escape sequences was impossible, but assumed that good reasons existed why this was the case.

Of course working with other document types, nesting is more or less trivial:

<foo> the <bar> quick </bar> brown </foo> 

or with JSON

{         type=foo,         text=[                 "the",                 {type=bar, text="quick",},                 "brown",         ] } 

But with Ansi, its something like this:

\e[1m the \e[2m quick \e[1m brown 

giving an output like this:

enter image description here

Basically meaning that you would need to manually track the formatting, and explicitly construct escape sequences to represent all output moving forward. You can obviously make due, but it complicates things. Before complaining about this, I’d like to clarify what reasons exist that would necessitate an escape sequence model over say, a structured document style.

Questions:

Is it purely due to legacy reasons why displaying text on our video terminals is done with ANSI escape sequences and not another framework such as JSON, Yaml, XML, or something else?

Is ANSI escape sequences in video terminal, simply an old technology similar to say, X11 that sticks around solely due to how embedded it is within the computing paradigm?

If not, why don’t developers switch from an escape sequence style to something that would support nesting?

Are there any proposals to do away with ANSI escapes in terminals and replace it with something else?

Magento 2: Products Aren’t Showing up. But they exist in backend!

I’ve added products in the backend even a test one. But they will not show up no matter what we do.

We have already tried php bin/magento indexer:reindex in the SSH We have cleared the cache, It worked on the local build but once we pushed it up it just refused to work. All the products have been manually added.

Im pulling my hair out at the moment.

They are visible in backend, But not in frontend, I cant see them in the products menu.

Does anyone have any ideas what on earth is going on?

I’ve editing the following files: app\code\Modules\Catalog\etc\di.xml app\code\Modules\Catalog\Model\Indexer\Category\Product\Action\Full.php

As referenced in this stackoverflow link https://stackoverflow.com/questions/33927658/products-is-not-showing-up-on-magento2-subcategory#answer-44364827

We have also tried invalidating and then reindexing.

Any advice would be greatly appreciated.

Запуск backend и frontend на nodejs

Решил запустить небольшое nodejs/vuejs приложение форума из этого репозитория: https://github.com/marcelobbfonseca/forum

После всех манипуляций (npm install / правка конфиг файла) пытаюсь запустить приложение. Если запускать из корневой директории (npm run dev) запускается бэкенд на localhost:3000. Если запускать из поддиректории frontend (npm run serve) запускается фронтенд на localhost:8080. Полагаю, что это не совсем правильный способ запуска подобных приложений, поскольку в самом репозитории все запросы из фронтенда в бэкенд идут относительными путями (/api/v1/settings, например). Иными словами, как правильно нужно запускать подобные приложения на nodejs, чтобы фронт и бек работали на одном хосте?

Optimising the Magento 2 backend

In general, the loading times of pages in the backend are around 2 seconds. Can’t really argue with that. However, I have noticed that Grid Pages (such as the Order and Products) require additional time to finish rendering the page.

If you look at Chrome you can see that after the page loads, it takes ad additional 2 seconds to render the Grid with the Order/Product Data.

enter image description here

Having looked at the loading assets, the following asset is to culprit. It appears that this is responsible for retrieving data from the database. The waterfall data attributes the time down to the TTFB.

enter image description here

What I find interesting, is that if you use any of the Filters or Searches after the page loads, the page renders with the results almost instantly. It’s just that initial page load.

However, the reason for this post is an attempt to shed some more light on the following:

  • As I have no other Production environments to benchmark against, is the Load vs Finish time a reasonable expectation? i.e. Should I even bother to attempt to optimise this
  • If I were to optimise this, should I be looking at PHP or MySQL as root of the TTFB delay?

Side Note: It also appears that limiting both the Number of Results and the Number of Columns has a small but positive effect on Finish time.