Typesafe Activator 入门使用

The Typesafe Reactive Platform includes Typesafe Activator which gets you started with Play Framework, Akka and Scala

一、下载与安装
下载Typesafe Activator
将下载下来的文件解压 到指定目录:
如:F:\opensouce\akka\software\activator-dist-1.3.5
设置环境变量 ACTIVATOR_HOME = F:\opensouce\akka\software\activator-dist-1.3.5

二、基本使用

2.1 启动 activator

下面是不同平台的启动方式

Launch the UI on Windows
From Windows Explorer

Right-click on the activator.bat file
Select "Open"
If prompted with a warning, select to continue

From a Command prompt

Navigate to the directory containing the activator.bat file
Run: activator ui

Launch the UI on Mac
From Finder

Ctrl-click or right-click on the activator file
Select "Open"
When prompted, select "Open"

From Terminal

Navigate the the directory containing the activator file
Run: ./activator ui

Launch the UI on Linux
From a GUI file browser

Double-click on the activator file

From Terminal

Navigate the the directory containing the activator file
Run: ./activator ui

执行后,就可以通过 在url 输入 http://localhost:8888

2.2 基本命令

  • 创建项目命令 : activator new
  • 运行命令: activator run

三、Activator 配置
3.1 代理设置

# This are the proxy settings we use for activator
# Multiple proxy hosts can be used by separating them with a '|' sign
# Do not enclose the proxy host(s) in quotes
-Dhttp.proxyHost=PUT YOUR PROXY HOST HERE
-Dhttp.proxyPort=PUT YOUR PROXY PORT HERE
# Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable.
-Dhttp.nonProxyHosts="localhost|127.0.0.1"
# These are commented out, but if you need to use authentication for your proxy, please fill these out.
#-Dhttp.proxyUser=PUT YOUR PROXY USER HERE
#-Dhttp.proxyPassword=PUT YOUR PROXY PASSWORD HERE

方式有2种:
属性方式 :如 Activator -Dhttp.proxyHost=PUT YOUR PROXY HOST HERE
文件方式: 如:Activator/activatorconfig.txt
相关属性写到activatorconfig.txt文件中

3.2 Network Timeout 调整
-Dactivator.timeout=30s

你可能感兴趣的:(scala,akka,play)