This content is part of the tutorial describing how to develop a very simple JavaScript client using the Alfresco 5.2 REST APIs. In this document is described how to setup the development environment. To better describe the tasks, we are going to use “a step by step“ approach, more practical and easy to follow for our goal.
Before starting the description of the development environment setup, let's share some prerequisites. First of all we assume that you have available Alfresco Content Services 5.2 and the Alfresco API Explorer, up and running. There are no specific requirements and setup for both the softwares.
We suggest to have the Alfresco instance installed into the same server/machine of the development environment. It's not mandatory in general, but be aware the provided source code assumes this as a prerequisite. If you decide to use two different servers/machines please remember to change the
localhost
in every URL.
In this task we're going to use an environment based on Ubuntu 16.04 LTS, though all the described tasks are valid for all Linux based, Windows based, and Mac OS X platforms. Tests and screenshots are based on tests developed on this specific environment.
Once Alfresco Content Services 5.2 is up an running, together with the Alfresco API Explorer, it's time to setup the IDE for the development. In this specific case we're going to use Microsoft Visual Studio. It's free in its Community version, it is supported for the most common platforms (Linux-based platforms included) and it works well with JavaScript based projects. It's not mandatory to use this IDE in particular, but be aware it has been used in all the following content.
Installing the Microsoft Visual Studio Community is very straightforward. Below the steps to follow, to complete the task.
tar.gz
file will be downloaded.tar.gz
file to the target path (in our case ~
or /home/<user>
path). A folder called VSCode-linux-x64
will be extracted.sudo ln -s ~/VSCode-linux-x64/code /usr/local/bin/code
Now that Microsoft Visual Studio for Linux is installed into your development environment, we're going to setup Postman REST client. Postman is released as a Chrome App which means that Postman can only run on the Chrome browser. So to use Postman, you'll first need to install Google Chrome.
If you already have Chrome installed, head over to Postman’s page on the Chrome Webstore, and click Add to Chrome
. The download should take few minutes, depending on your internet connection. Once you’ve downloaded the app, launch Postman. Here the description on how to launch it in all the available platforms.
How can we be sure everything is working properly? Let's test it with the tasks described below.
This test is a first access to Alfresco REST APIs using Postman. To try it into your environment, open Postman and select Basic Auth
in the Type
field in the Authorization
tab. In the URL input (on top of the panel) enter the following link:
http://<alfresco IP>:<alfresco port>/alfresco/api/-default-/public/alfresco/versions/1/nodes/-root-/children
Then click Send
and you should see something similar to the following screenshot.
If this is confirmed, then congratulations! You've successfully installed everything needed to test the new Alfresco REST APIs.
Next task - Authenticating over Alfresco using the Alfresco REST API >>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.