How to run appium server?

Hello pls tel where i will get this path ( /usr/local/bin/node ) in my system i have search this path but i am not able to find this. When i was running then message shows not able to find and this path also ( /Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js )
You can check below startAppium() method.
I have used this command to install Appium (run npm install -g appium )

@BeforeSuite
public static void startAppium(){
System.out.println(“Trying to start Appium Server!”);
service = new AppiumServiceBuilder().usingDriverExecutable(new File("/usr/local/bin/node")).
withAppiumJS(new File("/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js"));
service.build().start();
System.out.println(“Appium Server is at your service!”);
}

You can find it by using which node command

Enter

appium

in your terminal. Check this video to install Appium server

https://www.youtube.com/watch?v=G6J2x2Pbk-A

Hello
I have install the appium the way its given in this video. I want to run appium my java code which is below this.

@BeforeSuite
public static void startAppium(){
System.out.println(“Trying to start Appium Server!”);
service = new AppiumServiceBuilder().usingDriverExecutable(new File("/usr/local/bin/node")).
withAppiumJS(new File("/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js"));
service.build().start();
System.out.println(“Appium Server is at your service!”);
}

In this above code path is given as u can see below , pls tel where to find this path. I am not able to find
usingDriverExecutable(new File("/usr/local/bin/node"))
/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js

I want to run appium my java code which is below this line

@BeforeSuite
public static void startAppium(){
System.out.println(“Trying to start Appium Server!”);
service = new AppiumServiceBuilder().usingDriverExecutable(new File("/usr/local/bin/node")).
withAppiumJS(new File("/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js"));
service.build().start();
System.out.println(“Appium Server is at your service!”);
}

As u can see path is given in above code , pls tel this path is declaring which location Thanks
usingDriverExecutable(new File("/usr/local/bin/node
“/Applications/Appium.app/Contents/Resources/app/node_modules/appium/build/lib/main.js”

Well, those are pathes to node and node appium package.

You can find node location as I mentioned above by using a command
which node

For example of setup you can take a look at https://github.com/olyv/WortschatzAppium/blob/master/src/test/java/com/olyv/wortschatz/appium/BaseTest.java