Skip to content

Commit a504dc7

Browse files
committed
Getting started: net.box - use 'tt run -i'
1 parent 1f05020 commit a504dc7

File tree

1 file changed

+10
-48
lines changed

1 file changed

+10
-48
lines changed

doc/how-to/getting_started_net_box.rst

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -35,65 +35,27 @@ You can find the full example on GitHub: `sample_db <https://github.com/tarantoo
3535

3636

3737

38-
.. _getting_started_net_box_creating-app:
39-
40-
Creating an application connecting to the database
41-
--------------------------------------------------
42-
43-
The :ref:`tt create <tt-create>` command can be used to :ref:`create an application <admin-instance_config-develop-app>` from a predefined or custom template.
44-
In this tutorial, the application layout is prepared manually:
45-
46-
#. Create a tt environment in the current directory using the :ref:`tt init <tt-init>` command.
47-
48-
#. Inside the ``instances.enabled`` directory of the created tt environment, create the ``net_box`` directory.
49-
50-
#. Inside ``instances.enabled/net_box``, create the ``instances.yml`` and ``config.yaml`` files:
51-
52-
* ``instances.yml`` specifies instances to run in the current environment. In this example, there is one instance:
53-
54-
.. literalinclude:: /code_snippets/snippets/connectors/instances.enabled/net_box/instances.yml
55-
:language: yaml
56-
:dedent:
57-
58-
* ``config.yaml`` contains basic instance :ref:`configuration <configuration_file>`:
59-
60-
.. literalinclude:: /code_snippets/snippets/connectors/instances.enabled/net_box/config.yaml
61-
:language: yaml
62-
:end-at: iproto
63-
:dedent:
64-
65-
66-
6738
.. _getting_started_net_box_interactive:
6839

6940
Making net.box requests interactively
7041
-------------------------------------
7142

72-
To try out ``net.box`` requests in the interactive console, you need to start sample applications:
73-
74-
1. Start the :ref:`sample_db <getting_started_net_box_sample_db>` application using ``tt start``:
75-
76-
.. code-block:: console
77-
78-
$ tt start sample_db
79-
80-
2. Start the :ref:`net_box <getting_started_net_box_creating-app>` application:
81-
82-
.. code-block:: console
43+
To try out ``net.box`` requests in the interactive console, you need to start the :ref:`sample_db <getting_started_net_box_sample_db>` application using ``tt start``:
8344

84-
$ tt start net_box
45+
.. code-block:: console
8546
86-
3. Connect to ``net_box:instance001`` using ``tt connect``:
47+
$ tt start sample_db
8748
88-
.. code-block:: console
49+
Then, use the :ref:`tt run -i <tt-run>` command to start an interactive console:
8950

90-
$ tt connect net_box:instance001
91-
• Connecting to the instance...
92-
• Connected to net_box:instance001
51+
.. code-block:: console
9352
94-
net_box:instance001>
53+
$ tt run -i
54+
Tarantool 3.0.0-entrypoint-1144-geaff238d9
55+
type 'help' for interactive help
56+
tarantool>
9557
96-
In the instance's console, you can create a ``net.box`` connection and try out data operations.
58+
In the console, you can create a ``net.box`` connection and try out data operations.
9759

9860

9961

0 commit comments

Comments
 (0)