Skip to content

Instantly share code, notes, and snippets.

@alexedwards
alexedwards / main.go
Created November 10, 2020 10:20
JSON encoding benchmarks #2
package main
import (
"encoding/json"
"net/http"
)
func main() {}
func healthcheckHandlerMarshalIndent(w http.ResponseWriter, r *http.Request) {
@singhayushh
singhayushh / connectingMongoDB.md
Last active February 3, 2024 15:24
Connecting MongoDB Atlas

Here's how to create a free cluster and connect it to your project using the connection string

  1. Create an account on MongoDB Cloud Atlas
  2. You will be prompted right away to create a new project and org. You may leave all values as default and click Continue.
  3. Three cards will show up next asking you to choose a cluster. Select the Shared Cluster - that's the one which is free.
  4. The next screen is about details of the cluster. Make sure M0 Cluster Tier is selected. You may leave all values as default and click on Create Cluster
  5. Wait for some time for the cluster to get ready and then click on Connect.
  6. First thing you need to add it IP Address. Select Add your current IP Address if you are working on the project yourself only or Allow Access from Anywhere. You may even manually add IP Addresses by clicking on Add a different IP...
  7. Next up is Database user creation. You need to enter a username and password. For explanatory purposes, say I ad