Write trainjs command