<i id='gyfyO'><tr id='gyfyO'><dt id='gyfyO'><q id='gyfyO'><span id='gyfyO'><b id='gyfyO'><form id='gyfyO'><ins id='gyfyO'></ins><ul id='gyfyO'></ul><sub id='gyfyO'></sub></form><legend id='gyfyO'></legend><bdo id='gyfyO'><pre id='gyfyO'><center id='gyfyO'></center></pre></bdo></b><th id='gyfyO'></th></span></q></dt></tr></i><div id='gyfyO'><tfoot id='gyfyO'></tfoot><dl id='gyfyO'><fieldset id='gyfyO'></fieldset></dl></div>

<small id='gyfyO'></small><noframes id='gyfyO'>

  • <tfoot id='gyfyO'></tfoot>
  • <legend id='gyfyO'><style id='gyfyO'><dir id='gyfyO'><q id='gyfyO'></q></dir></style></legend>

      • <bdo id='gyfyO'></bdo><ul id='gyfyO'></ul>

      1. 如何使用 dynamoose 查询本地 dynamoDB?

        时间:2023-09-03
          <legend id='0BuQo'><style id='0BuQo'><dir id='0BuQo'><q id='0BuQo'></q></dir></style></legend>
            <tbody id='0BuQo'></tbody>

            <bdo id='0BuQo'></bdo><ul id='0BuQo'></ul>
            <tfoot id='0BuQo'></tfoot>
          • <i id='0BuQo'><tr id='0BuQo'><dt id='0BuQo'><q id='0BuQo'><span id='0BuQo'><b id='0BuQo'><form id='0BuQo'><ins id='0BuQo'></ins><ul id='0BuQo'></ul><sub id='0BuQo'></sub></form><legend id='0BuQo'></legend><bdo id='0BuQo'><pre id='0BuQo'><center id='0BuQo'></center></pre></bdo></b><th id='0BuQo'></th></span></q></dt></tr></i><div id='0BuQo'><tfoot id='0BuQo'></tfoot><dl id='0BuQo'><fieldset id='0BuQo'></fieldset></dl></div>

                <small id='0BuQo'></small><noframes id='0BuQo'>

                1. 本文介绍了如何使用 dynamoose 查询本地 dynamoDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  作为开发人员,我不想一直连接到 Amazon Web 服务,我在本地计算机上安装了 DynamoDB,参考 AWS 文档.我在后端使用 node.js.

                  As a developer, i don't want to connect all the time to Amazon web services, and I installed DynamoDB in my local computer referring the AWS Docs. I am using node.js in the backend.

                  我在生产中使用 dynamoose 作为 Amazon DynamoDB 的建模工具,如何使用相同的 dynamoose 查询本地 DynamoDB 表进行开发?

                  I am using dynamoose as the modeling tool for Amazon's DynamoDB in my production, How can I use the same dynamoose for querying my local DynamoDB tables for development?

                  推荐答案

                  你只需在你的代码中使用这个:

                  You just use this in your code:

                  dynamoose.local();
                  

                  假设您的应用程序中有一个属性文件,您可能需要一个属性标志来指示您是处于开发阶段还是生产阶段.然后在您的代码中,获取属性,如果您处于开发阶段,请运行 dynamoose.local() 行.

                  Assuming you have a properties file in your application, you probably want a property flag to indicate whether you are in Development or Production. Then in your code, get the property, if you are in Development, run the dynamoose.local() line.

                  我不会用 javascript 编写代码,但它会是这样的:

                  I don't code in javascript but it will be something like:

                  const { NODE_ENV } = process.env
                  if (NODE_ENV == "DEV") {
                      dynamoose.local();
                  }
                  

                  这假设您的应用程序中有一个属性文件,您在其中设置了一个名为环境"的系统属性.具有说DEV"的值或产品".

                  This assume you have a properties file in your application where you set a system property called "environment" to have a value of say "DEV" or "PROD".

                  这篇关于如何使用 dynamoose 查询本地 dynamoDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将不存在的元素添加到 DynamoDB 中的数组 下一篇:尝试从 REST API 获取数据时,请求的资源上不存在

                  相关文章

                  最新文章

                  <i id='ySWWj'><tr id='ySWWj'><dt id='ySWWj'><q id='ySWWj'><span id='ySWWj'><b id='ySWWj'><form id='ySWWj'><ins id='ySWWj'></ins><ul id='ySWWj'></ul><sub id='ySWWj'></sub></form><legend id='ySWWj'></legend><bdo id='ySWWj'><pre id='ySWWj'><center id='ySWWj'></center></pre></bdo></b><th id='ySWWj'></th></span></q></dt></tr></i><div id='ySWWj'><tfoot id='ySWWj'></tfoot><dl id='ySWWj'><fieldset id='ySWWj'></fieldset></dl></div>

                  <legend id='ySWWj'><style id='ySWWj'><dir id='ySWWj'><q id='ySWWj'></q></dir></style></legend><tfoot id='ySWWj'></tfoot>
                    • <bdo id='ySWWj'></bdo><ul id='ySWWj'></ul>

                      <small id='ySWWj'></small><noframes id='ySWWj'>