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. 模拟Windows系统“回收站”

    HTML: <!DOCTYPE html><html> <head> <meta http-equiv="content-type" co ...

  2. Lesson 7: C#多线程

    C#多线程 1.适用于: 通过网络进行通信 执行占用时间的操作 区分具有不同优先级的任务 使用户界面在执行后台任务时能快速响应用户的交互 2.Thread类常用属性及方法 属性: IsAlive:显示 ...

  3. http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/

    转载自:http://stormzhang.com/opensource/2016/06/26/android-open-source-project-recommend1/ 推荐他的所有博文~ 图片 ...

  4. 理想中的SQL语句条件拼接方式

    背景 Orm用过一些,但处理增删改上面做的都不错.但是查询上跟我想要的效果总是差了一点.我想要的效果则是这样,基于某种命名规则进行传参,后台解析器知道命名规则即可知道它要查询什么样的数据. 谈谈我之前 ...

  5. 一个C优先级队列实现

    刚下班没事干,实现了一个简单的优先级队列 #include <stdlib.h>#include <stdio.h> typedef void (*pqueue_setinde ...

  6. Appium+python自动化14-查看webview上元素(DevTools)【转载】

    前言 app上webview的页面实际上是启用的chrome浏览器的内核加载的,如何把手机的网页加载到电脑上,电脑的chrome浏览器上有个开发模式DevTools,是可以方便调试的. 一.环境准备 ...

  7. Python基础-列表、元祖

    1. 列表.元组操作 列表是我们最以后最常用的数据类型之一,通过列表可以对数据实现最方便的存储.修改等操作 定义列表 names = ['Alex',"Tenglan",'Eric ...

  8. ubuntu 开启PHP CURL支持

    sudo apt-get install php5-curl sudo service apache2 restart

  9. (12)oracle事务

    事物 http://www.cnblogs.com/linjiqin/archive/2012/02/06/2340637.htm 在当前的事务中设置保存点 savepoint  名字; 保存点回滚 ...

  10. “玲珑杯”ACM比赛 Round #1

    Start Time:2016-08-20 13:00:00 End Time:2016-08-20 18:00:00 Refresh Time:2017-11-12 19:51:52 Public ...