如何将Express Web项目转换为Windows独立应用程序

时间:2018-10-01 10:56:26

标签: node.js express

有什么方法可以将Express Web项目转换为独立的窗口应用程序。我在Google上搜索了很多,找到了大多数答案,但是其中大多数包json都是这样的

@Stepwise
class WorkbookPoolSpec extends Specification {
  @AutoAttach
  def workbook = MockHolder.workbook

  @AutoAttach
  def workbookFactory = MockHolder.workbookFactory

  @Shared
  def workbookPool = new WorkbookPool(MockHolder.workbookFactory)

  def 'workbook is created on check-out'() {
    when:
    workbookPool.borrowWorkbook()
    then:
    1 * workbookFactory.create() >> workbook
  }

  def 'workbook is reset on check-in'() {
    when:
    workbookPool.returnWorkbook(workbook)
    then:
    1 * workbook.reset()
  }

  static class MockHolder {
    static Workbook workbook = new DetachedMockFactory().Mock(Workbook)
    static WorkbookFactory workbookFactory = new DetachedMockFactory().Mock(WorkbookFactory)
  }
}

但是我的包json是这样的

  {
  "name": "login",
   "version": "0.1.0",
   "main": "index.html",
   "productName": "login",
   "engines": {
   "node": ">=4"
   },

现在我的问题是,我如何使用nw.js进行转换可以有人建议我解决方案,或者有其他方法可以完成此注释:-我不想编写任何额外的代码

1 个答案:

答案 0 :(得分:1)

您最好的选择可能是Electron。不过,您将不得不移植它,因为无法将其转换为1-1。