serverless / serverless/examples

aws-node-rest-api-typescript: Add Mongo/Atlas connection instructions

Open
#580 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.5k
Forks
4.4k
Avg merge
2h 55m
Merged PRs (30d)
3

Description

Following the instructions in README.md on running the app you will see
{"message": "Internal server error"}

And a stack trace resembling

 MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
      at NativeConnection.Connection.openUri (C:\Users\luke\src\luke-typescript-rest-api-app\node_modules\mongoose\lib\connection.js:693:11)
      at C:\Users\luke\src\luke-typescript-rest-api-app\node_modules\mongoose\lib\index.js:345:10
      at C:\Users\luke\src\luke-typescript-rest-api-app\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:5

I think this is because the Mongo/Atlas connection strings need to be set first. Would be handy to have how to do this in the readme.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the aws-node-rest-api-typescript README and the MongoDB/Mongoose configuration used by the example. Reproduce the documented run far enough to confirm the undefined uri error, then document how to set the Mongo/Atlas connection strings and verify that the app starts without the internal server error.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, typescript
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.