# 5 - First Step
Up to now we've created a pipeline by adding existing steps to the pipeline definition. In this section we create a new step.
Steps can contain any logic you choose, but for simplicity here we'll keep it simple and just write out a message to the console.
# Creating the step
- Create a new folder
myProject/steps
. - Copy
COURSE-FILES/2.5-first-step/MyFirstStep.js
into this folder. - Open
COURSE-FILES/2.5-first-step/app.js
using Open to the Side, and copy the changes to yourapp.js
.
Once you restart the server, your step will be available for adding to pipelines in MONDAT. It will appear under the myProject category on the pipeline definition page, because we registered it as 'myProject/myFirstStep'.
# Testing the step
In MONDAT, add your new step to myPipeline, just after the delay.
Save app.js again, so the server restarts with the new pipeline definition.
Run the test again. In the console for the server, you will see the messages written out by your step.
rec= SaySomething { msg: 'Hello World 1' }
RandomDelayStep (s-db115096da7f8a9c15a1a302960b42f07e72e8aa)
Delay 50ms (50ms - 500ms)
Random delay completed
Here we are in my first step. Yay! <=== HERE IT IS!!!
rec= SaySomething { msg: 'Hello World 2' }
2
3
4
5
6
ZZZZZ Step description and UI fields ZZZZZ https://mail.google.com/mail/u/1/#search/replyConverter/KtbxLzFzVXbQbfBTWrqlsvsmRJGdXxXDXq
ZZZZZ Make changes to access the input and the definition