https://github.com/dunghenry/sinatra_mongodb
https://github.com/dunghenry/sinatra_mongodb
mongodb ruby sinatra-applications
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dunghenry/sinatra_mongodb
- Owner: dunghenry
- Created: 2023-02-01T01:04:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-03T02:06:22.000Z (over 3 years ago)
- Last Synced: 2025-03-20T22:51:22.622Z (over 1 year ago)
- Topics: mongodb, ruby, sinatra-applications
- Language: Ruby
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sinatra + MongoDB
## Setup project
### Config MongoDB local
```js
development:
clients:
default:
database: database_name
hosts:
- localhost:27017
options:
server_selection_timeout: 1
```
### Config MongoDB Atlas
```js
development:
clients:
default:
uri: mongodb+srv://username:passsword@yourcluster.mongodb.net/database_name?retryWrites=true&w=majority
options:
server_selection_timeout: 5
```
### Start server
```js
ruby main.rb
```