Skip to content

Commit

Permalink
improved setup commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sigdestad committed Dec 20, 2023
1 parent 6905930 commit c72b86c
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions docs/setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,29 @@ TIP: To upgrade, use `enonic latest`. If there are new versions you will see ins

A sandbox is a local developer instance of our platform - Enonic XP. Each sandbox is isolated from the other ones and can run different versions of the platform.

. **Create a sandbox** by running this command in your terminal:
. *Create a sandbox* called `tutorial` by running this command in your terminal:
+
enonic sandbox create
enonic sandbox create mfstutorial
+
Give it a name, i.e. `Tutorial`, and agree to continue with the most recent version of Enonic XP. The CLI will proceed to download and setup your local developer instance, i.e, your sandbox.
Agree to continue with the most recent version of Enonic XP. The CLI will proceed to download and setup your local developer instance, i.e, your sandbox.
+
. **Start the sandbox** with this command:
+
enonic sandbox start --dev
enonic sandbox start mfstutorial --dev
+
Select the `Tutorial` sandbox from the list, and it will boot up in development mode.
This will start the `mfstutorial` sandbox.

TIP: --dev starts the sandbox in https://developer.enonic.com/docs/xp/stable/dev/build#dev_mode[developer mode].

== Create the app

From a **new terminal window**, run the following command to create the application.
From a **new terminal window**, run the following command to create the application.

IMPORTANT: Use the default options when prompted.
enonic project create -d mfs -r tutorial-myfirstsite -sb mfstutorial my.first.site

enonic project create -r tutorial-myfirstsite

[TIP]
[NOTE]
====
The command uses the https://github.com/enonic/tutorial-myfirstsite[My first site^] Github repo as a starter (template) for the app.
This command creates an app named `my.first.site` in the folder `mfs/`. It uses the https://github.com/enonic/tutorial-myfirstsite[My first site^] Github repo as a starter (template), and links it to the `mfstutorial` sandbox.
====

== Project structure
Expand Down Expand Up @@ -86,27 +84,27 @@ src/

== Start building

Assuming you did not change the default directory name `myproject/` when creating the app, deploy it to the sandbox with the following commands:
Assuming you did not change any of the values when creating the app, run the following commmands:

cd myproject
enonic project dev
cd mfs
enonic dev

This will build and deploy the application to your sandbox, the `dev` task will continuously scan for changes in your TypeScript code and compile them.
This will build and deploy the application to your sandbox. Until you abort, the build system will continuously scan for changes in your TypeScript code and compile them.

[NOTE]
====
Look for a line like this in the sandbox log to verify that the app has started:
2019-04-09 13:40:40,765 INFO ... Application [company.starter.myfirstsite] installed successfully
2019-04-09 13:40:40,765 INFO ... Application [my.first.site] installed successfully
====

TIP: Thanks to the sandbox running in --dev mode, any changes to the code wihin your app will instantly be picked up.
TIP: Because the sandbox is running in --dev mode, any changes to the code wihin your app will instantly be picked up. No need for manual deployments.


== Summary

You have installed the Enonic CLI, created your first sandbox using the latest XP version, deployed an app to that sandbox based on one of our starters, executed CLI commands to `build` your app , `deploy` it to your sandbox, and run the app in `dev` mode, and finally, installed Content Studio app.
You have installed the Enonic CLI, created your first sandbox using the latest XP version, deployed an app to that sandbox based on one of our starters and deployed the app in `dev` mode.

That's a good start!

Next, let's <<content#, have a look at Content Studio>> and some sample content.
Next, let's <<content#, have a look at Content Studio>> and the sample content.

0 comments on commit c72b86c

Please sign in to comment.