在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):ushahidi/platform-client开源软件地址(OpenSource Url):https://github.com/ushahidi/platform-client开源编程语言(OpenSource Language):JavaScript 69.5%开源软件介绍(OpenSource Introduction):Ushahidi Platform Web ClientReport and find Ushahidi Platform V3 issuesAll our issues live in https://github.com/ushahidi/platform/issues . Try it out on HerokuYou need to deploy the Platform API first Platform Client installationWhat is the platform client?The web client is the component that end users interact with when opening the Platform website with a web browser. The client interacts with the API in order to perform operations on the system (i.e. submit posts, query posts). Installation stepsPre-requisite: Install the platform API by following one of the API setup guides Pre-requisite: Install Node V6.x (you might want to use NVM for this) before continuing. Getting the platform-client codeClone the repository (this will create a directory named platform-client) git clone https://github.com/ushahidi/platform-client.git Go into the platform directory cd platform-client Switch to the develop branch git checkout develop If you haven't used git before or need help with git specific issues, make sure to check out their docs here https://git-scm.com/doc Install the platform-client dependencies.
The client needs to point to the hostname where the backend expects to receive HTTP requests. This has to be set before building the client. In order to set up all that, create a file at the location /var/www/platform-client/.env . Use the following contents as an example:
To make it easy to call `gulp` when building and developing in the app, add node_modules/.bin to your PATH in ~/.bashrc. Example PATH (relevant part in bold): export PATH=$HOME/bin:/usr/local/bin:node_modules/.bin:$PATH
alternatively, if you haven't setup node_modules in your PATH, run: Running a local development serverRun:
This will start the watcher for local development, and any changes you make to the code will be reflected in the application. Building for production deploymentsRun:
alternatively, if you haven't setup node_modules in your PATH, run:
This will start the process of generating the static site. Once the files are generated, you can host the server/www directory and load the site. In the server directory you will also find an example nginx and an example apache2 file to get you started on hosting the client. Running unit testsTo run unit tests once, run:
For test driven development we have a gulp task Native Server (Apache or Nginx)If you are running the client with a native web server like Apache or nginx, you will need to use URL rewriting to point all non-existant files to
Nginx users will have to manually configure rewriting in the site configuration file. I'm a developer, should I contribute to Ushahidi 3.x?Yes! Development moves pretty quickly but the tech stack is getting more and more stable. If you're keen to help build something awesome, jump on board. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论