Now by Zeit has recently been updated and now supports multi-language monorepos. In this lesson we'll build and deploy a simple app with an API powered by Node.js and Go.

If you want to follow along with this lesson, you will need to install now-cli.

Install:

npm i -g now

Create now.json:

{
"version": ,
}

If we have a index.html, already. We can still run:

now

to deploy the site.

Let's say we have current folder structure:

src

-- index.js

index.html (it includes index.js by inline - script)

We need to include index.js file as well when deploy:

now.json:

{
"version": ,
"builds": [
{ "src": "src/index.js", "use": "@now/node" },
{ "src": "index.html", "use": "@now/static" }
]
}

If you are using npm modules which installed by yarn or npm, switch to @now/node-server

[Tools] Deploy a Monorepo to Now V2的更多相关文章

  1. windows 精简/封装/部署

    给一个精简过的Windows7安装net35,提示自己到『打开或关闭Windows功能』里打开,然而发现并没有,只有一个ie9的功能.搜索尝试各种办法,显然都不行.用dism部署功能的工具,挂载一个完 ...

  2. gcc, numpy, rabbitmq等安装升级总结

    1. 公司在下面目录安装了gcc-4.8.2,以支持c++11,可以通过在bashrc中添加来实现: PATH=/opt/compiler/gcc-4.8.2/bin:$PATH 2. 公司环境切换到 ...

  3. Team Foundation Server 2013 with Update 3 Install LOG

    [Info   @10:14:58.155] ====================================================================[Info   @ ...

  4. Windows7WithSP1/TeamFoundationServer2012update4/SQLServer2012

    [Info   @09:03:33.737] ====================================================================[Info   @ ...

  5. docker 发布方式尝试

    docker 发布方式尝试 目前有个小项目, 尝试用docker的方式来发布, 项目只有一个节点, 使用 kubenate 有点小题大做, 所以采用docker-compose来发布. 发布过程 GI ...

  6. facebook视频上传python 返回错误code:100,'type':OAuthException

    首先重新获取访问口令token: https://developers.facebook.com/tools/debug/accesstoken/?q=EAAYDuzyd3eYBAK9lZCErZBl ...

  7. hadoop分布式集群的搭建

    电脑如果是8G内存或者以下建议搭建3节点集群,如果是搭建5节点集群就要增加内存条了.当然实际开发中不会用虚拟机做,一些小公司刚刚起步的时候会采用云服务,因为开始数据量不大. 但随着数据量的增大才会考虑 ...

  8. win10下网狐荣耀手机端android app编译

    基于荣耀版(2017.5.21)12 款游戏..7z这款游戏,网上有下载的 1.解压后进入 cd shoujiduan 2.将client/base复制到client/ciphercode/下,也就是 ...

  9. Windows中的SID详解

    SID详解前言 SID也就是安全标识符(Security Identifiers),是标识用户.组和计算机帐户的唯一的号码.在第一次创建该帐户时,将给网络上的每一个帐户发布一个唯一的 SID.Wind ...

随机推荐

  1. iphone CGBitmapContextCreate()函数解释

    http://blog.sina.com.cn/s/blog_3e50cef401019cd2.html CGContextRef CGBitmapContextCreate ( void *data ...

  2. Synthesis of memory barriers

    A framework is provided for automatic inference of memory fences in concurrent programs. A method is ...

  3. 新建module---获取带宽信息

    借鉴自http://blog.csdn.net/xjtuse2014/article/details/53968726 1.MoniterBandwidth模块: package net.floodl ...

  4. 【转载】使用 PIVOT 和 UNPIVOT

    可以使用 PIVOT 和 UNPIVOT 关系运算符将表值表达式更改为另一个表.PIVOT 通过将表达式某一列中的唯一值转换为输出中的多个列来旋转表值表达式,并在必要时对最终输出中所需的任何其余列值执 ...

  5. Mac下安装node.js , Ionic

    访问node.js官网(https://nodejs.org/en/download/),下载相应的版本. 下载完,点击安装  [默认目录] Node.js v8.9.3 to /usr/local/ ...

  6. react 使用Form组件如何清空上一次操作

    最近在做一个表单联查时候,总是会发现后一个选择器会记住上一次选择的值 ,这会导致前一级选择器已经做出更新后,后一级选择器却还记住上一次的操作, 这里有个方法可以在上级选择器事件操作时清空Form组件的 ...

  7. Oracle高级函数

    http://www.cnblogs.com/chen1388/archive/2010/07/06/1771919.html decode函数: decode(aa, 1, 'xs', 2, 'ps ...

  8. 牛客练习赛16 A 字典序最大的子序列【贪心】

    链接:https://www.nowcoder.com/acm/contest/84/A 来源:牛客网 [出处]:http://codeforces.com/contest/196/problem/A ...

  9. HttpRunner 接口自动化测试进阶

    前面说到了httprunner的安装与简单使用,参见: https://www.cnblogs.com/chengtch/p/8735160.html 这里我们介绍一下通过调试源码的方式来做接口测试: ...

  10. centos忘记密码,重新设置密码的方法

    (1)重新启动Centos,在启动过程中,长按“ESC”键,进入GNU GRUB界面. (2)选择要进入的系统,按“E”键(在启动之前编辑命令). (3)选择第二项操作系统的内核“kernel”,按& ...