Create your app
Now we've created a server to run our app, the next step is to start creating the app itself.
Codenvy calls each app a project. You can run as many apps as you like on the same workspace/server.
Parts of the IDE
Once you've created your workspace, Codenvy will show you a collection of windows and messages.
Collectively, these are called an integrated development environment (IDE). Usually, an IDE is software that is downloaded and installed, but Codenvy's runs in the browser.
We're going to write and run all our code using this IDE.
If you leave your workspace unattended for a while, it will shut down. You will need to tell Codenvy to start it up again to continue coding.
The IDE has three main parts.
Terminal
The wide box on the bottom of the screen is the terminal. This is equivalent to the Javascript console we've been using in Codepen, or the one in your browser's developer tools.
If you use console.log()
in your server's code, the messages will appear here.
You can also type commands in the terminal and hit the return key to run them.
For some work, you may want to use more than one terminal tab. You can create new terminal tabs by clicking the "New Terminal" button on the left hand side.
Projects explorer
Your app will eventually consist of several files and folders, which you can browse through using this panel.
Code editor
The large panel in the centre of the screen is the code editor. This is where you will write and edit all your code from now on.
To-do
- In the Projects explorer, click 'Create project...'
- From the choices on the left side, select 'Node JS'
- Give your app a name. We're going to call ours 'my-app'
- Hit 'Create'
Once you've completed those steps, you'll see a new folder called my-app
appear in the projects explorer, with a file called hello.js
inside it.
Part of Web servers
- Create your serverP
- Create your appP
- Node and the terminalP
- More about the terminalP
- Web frameworksP
- Using ExpressP
- Serving static files
- Views and templates
- Routing
- Real data
- Includes
- Get confident with Express
- Build your app in ExpressP