sourceName
stringclasses
1 value
url
stringclasses
20 values
action
stringclasses
1 value
body
stringlengths
23
1.11k
format
stringclasses
1 value
metadata
dict
title
stringclasses
20 values
updated
stringclasses
1 value
embedding
sequencelengths
384
384
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
# Instant GraphQL APIs for MongoDB with Grafbase # Instant GraphQL APIs for MongoDB with Grafbase In the ever-evolving landscape of web development, efficient data management and retrieval are paramount for creating dynamic and responsive applications. MongoDB, a versatile NoSQL database, and GraphQL, a powerful query language for APIs, have emerged as a dynamic duo that empowers developers to build robust, flexible, and high-performance applications. When combined, MongoDB and GraphQL offer a powerful solution for front-end developers, especially when used at the edge. You may be curious about the synergy between an unstructured database and a structured query language. Fortunately, Grafbase offers a solution that seamlessly combines both by leveraging its distinctive connector schema transformations. ## Prerequisites In this tutorial, you’ll see how easy it is to get set up with MongoDB and Grafbase, simplifying the introduction of GraphQL into your applications. You will need the following to get started:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.060496795922517776, -0.013936665840446949, -0.02468806877732277, -0.03338273987174034, 0.024320261552929878, -0.011687575839459896, -0.023852085694670677, 0.03201303258538246, -0.027110237628221512, 0.012231258675456047, 0.00724195409566164, -0.04257605969905853, 0.045680586248636246, 0.03559825196862221, 0.006927254609763622, 0.024530868977308273, -0.016527973115444183, 0.023332830518484116, -0.03586060553789139, 0.008372573181986809, 0.01901710219681263, -0.03854502737522125, -0.03976732864975929, -0.061616331338882446, 0.0018312935717403889, 0.07550572603940964, -0.0028496349696069956, -0.032094020396471024, -0.038467518985271454, -0.20393094420433044, -0.011482726782560349, -0.04247492179274559, 0.037184521555900574, -0.06495103240013123, 0.01406800001859665, -0.03613949939608574, 0.03396232798695564, 0.05614179000258446, -0.029083259403705597, 0.0545719675719738, 0.07776627689599991, 0.004274656064808369, -0.01204209215939045, -0.024649085476994514, -0.01170481089502573, -0.06551378965377808, -0.02378818392753601, 0.014003749005496502, -0.014189893379807472, -0.05778475105762482, -0.0027971197851002216, -0.04924478754401207, 0.010005096904933453, 0.0305518489331007, 0.04721663519740105, 0.06485730409622192, 0.04151115566492081, 0.027652742341160774, 0.02677612192928791, 0.011981261894106865, 0.04977349936962128, 0.018237585201859474, -0.11752193421125412, 0.09466064721345901, 0.02360929176211357, 0.07265817373991013, -0.04220341891050339, -0.03663896396756172, 0.04558168351650238, 0.03183424100279808, 0.008092560805380344, 0.023607872426509857, 0.020098485052585602, 0.03730431944131851, 0.0457521416246891, -0.009162213653326035, -0.010588147677481174, -0.05121718719601631, 0.022310422733426094, -0.012398945167660713, -0.03367322310805321, -0.07248528301715851, -0.0338406078517437, 0.004052282311022282, -0.03509087488055229, -0.05925300717353821, -0.006757734809070826, -0.0422108955681324, 0.04713379219174385, 0.026242224499583244, -0.016996249556541443, -0.03366576135158539, 0.027345631271600723, 0.03275420889258385, -0.060240235179662704, 0.005968872923403978, 0.02104984223842621, 0.011280881240963936, 0.004755266010761261, 0.25912728905677795, -0.029703740030527115, 0.04612843692302704, 0.000840782537125051, -0.024384241551160812, -0.008534073829650879, -0.05851669982075691, 0.00310311047360301, -0.046336282044649124, 0.01863303780555725, 0.02965449169278145, -0.00890374556183815, -0.042009830474853516, 0.035736922174692154, -0.08913841843605042, -0.002581777283921838, -0.006521426606923342, 0.029163965955376625, 0.03701252490282059, -0.02786906436085701, 0.0036795921623706818, -0.014588795602321625, 0.045311134308576584, 0.03536665812134743, 0.0068950648419559, 0.048067111521959305, -0.059139691293239594, 0.024040240794420242, 0.05107918009161949, 0.023796357214450836, 0.028339214622974396, 0.05781225860118866, 0.0065587423741817474, -0.06807976216077805, -0.042385779321193695, -0.01596386358141899, -0.012215075083076954, 0.01890300028026104, 0.006719555705785751, 0.01833713985979557, 0.022664958611130714, -0.02604551613330841, -0.07284234464168549, -0.03139098733663559, -0.07009055465459824, -0.05819522961974144, 0.08811125159263611, -0.007816790603101254, 0.061978716403245926, -0.0947553887963295, -0.015845106914639473, -0.021243756636977196, 0.066636823117733, -0.02293585240840912, -0.01785038784146309, -0.00697851087898016, 0.04662709683179855, 0.02521531842648983, 0.05752410367131233, -0.014178928919136524, -0.020356660708785057, -0.02472156472504139, -0.029981277883052826, -0.044293321669101715, 0.1195639818906784, -0.013032002374529839, -0.1462368667125702, 0.0048246802762150764, 0.01079153548926115, -0.01034377608448267, -0.007573388516902924, -0.0013618797529488802, 0.03646279126405716, -0.07783367484807968, -0.007694794796407223, 0.08111041784286499, 0.035011060535907745, -0.061927974224090576, -0.03908352926373482, -0.007815798744559288, 0.005205611232668161, 0.0065457746386528015, -0.004119580145925283, -0.047896530479192734, 0.0046485294587910175, 0.014686414040625095, -0.04411802440881729, -0.018721338361501694, -0.008723525330424309, 0.06554104387760162, 0.046316295862197876, -0.034425653517246246, 0.03837376460433006, -0.041228845715522766, 0.01632804051041603, -0.01708957739174366, -0.06611359119415283, 0.0018717825878411531, -0.030266523361206055, 0.050024595111608505, -0.026192007586359978, 0.08461262285709381, -0.009516855701804161, -0.006452140863984823, 0.03252216801047325, 0.0014827590202912688, 0.017382482066750526, -0.024859687313437462, -0.020406007766723633, 0.012650929391384125, 0.029553361237049103, -0.027245255187153816, -0.0038782949559390545, 0.010554363019764423, 0.012248472310602665, -0.028560278937220573, -0.0225200392305851, 0.036528971046209335, -0.005061295814812183, 0.03213290870189667, 0.0333082377910614, -0.009119333699345589, -0.06728773564100266, -0.024472162127494812, -0.26877281069755554, 0.00023485881683882326, -0.03871488571166992, 0.0091667165979743, 0.055668141692876816, -0.0403556227684021, -0.009808093309402466, -0.067503921687603, -0.02506868541240692, 0.08395008742809296, 0.07642617076635361, 0.0023344603832811117, -0.005113792605698109, 0.035363540053367615, -0.0631597638130188, 0.08226250112056732, 0.03564674034714699, 0.020847752690315247, -0.03730497509241104, -0.03771331161260605, 0.036554962396621704, 0.019537456333637238, 0.001564522972330451, -0.09656700491905212, 0.02009296417236328, 0.03269367292523384, 0.22148260474205017, 0.033890560269355774, -0.01658814400434494, -0.037339042872190475, 0.05353833734989166, -0.023243622854351997, -0.02541366219520569, -0.14346309006214142, 0.06531964987516403, 0.032908953726291656, 0.026350470259785652, -0.003003969555720687, -0.006857479456812143, -0.025944562628865242, -0.024517228826880455, 0.0016468350077047944, 0.02135460264980793, -0.09209337830543518, -0.0023441852536052465, -0.0020031575113534927, -0.027312610298395157, 0.008192733861505985, -0.043819982558488846, 0.05744076892733574, -0.014917133376002312, 0.012833147309720516, 0.04807843640446663, 0.04649515077471733, -0.037773869931697845, -0.04535956308245659, -0.08782915025949478, 0.00787903182208538, -0.014856201596558094, 0.025585923343896866, 0.017596695572137833, -0.021885380148887634, -0.001573464018292725, -0.030368374660611153, 0.022715456783771515, 0.00027408168534748256, -0.008385388180613518, -0.0028003440238535404, 0.007726861163973808, -0.057453397661447525, -0.01563914492726326, 0.08488541841506958, -0.0172316562384367, 0.0452687107026577, 0.03585871681571007, 0.06509172916412354, 0.021984856575727463, 0.0036095152609050274, -0.01798291690647602, -0.06915619969367981, 0.0268429983407259, -0.03999963030219078, 0.0660448670387268, 0.03429282084107399, 0.026648256927728653, 0.02998557686805725, 0.10348708927631378, -0.011462153866887093, 0.015072488225996494, -0.008235164918005466, 0.024680964648723602, 0.01040484756231308, -0.03535299748182297, -0.054305464029312134, -0.00783294253051281, -0.02593720518052578, -0.3031010925769806, 0.030681025236845016, -0.00856784824281931, 0.032349977642297745, -0.0059316582046449184, 0.04035750776529312, 0.04468023031949997, 0.02594875358045101, -0.01333690993487835, -0.005405479576438665, 0.049289580434560776, 0.04786548763513565, 0.04782053083181381, 0.003531264839693904, 0.005708606913685799, 0.06817988306283951, 0.033957839012145996, -0.04228650778532028, 0.03774742782115936, -0.03506091237068176, 0.012570558115839958, 0.04075485095381737, 0.2409743368625641, 0.006000867113471031, 0.05530783161520958, 0.07141517847776413, -0.009416044689714909, 0.004037011414766312, 0.03771134838461876, 0.024649985134601593, -0.014369246549904346, 0.007831430993974209, 0.0839143618941307, -0.012867237441241741, 0.05066916346549988, 0.06972387433052063, -0.021199408918619156, 0.036251313984394073, 0.019655147567391396, -0.040748827159404755, -0.06840059906244278, 0.0191623754799366, -0.0033928039483726025, 0.01566450484097004, 0.08513319492340088, -0.034726422280073166, -0.03112015500664711, -0.06758660078048706, 0.005041320342570543, -0.003203632542863488, -0.06585807353258133, -0.05748786777257919, 0.01198530662804842, -0.019451957195997238, -0.0024863958824425936, 0.019835401326417923, -0.0009293576586060226, 0.01118531171232462, -0.03361624479293823, -0.05634922534227371, 0.03246961906552315, -0.057953450828790665, -0.02171633206307888, 0.028139224275946617, 0.008451961912214756 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
You will need the following to get started: - An account with Grafbase - An account with MongoDB Atlas - A database with data API access enabled ## Enable data API access You will need a database with MongoDB Atlas to follow along — create one now! For the purposes of this tutorial, I’ve created a free shared cluster with a single database deployment. We’ll refer to this instance as your “Data Source” later. through the `g.datasource(mongodb)` call. ## Create models for data The MongoDB connector empowers developers to organize their MongoDB collections in a manner that allows Grafbase to autonomously generate the essential queries and mutations for document creation, retrieval, update, and deletion within these collections. Within Grafbase, each configuration for a collection is referred to as a "model," and you have the flexibility to employ the supported GraphQL Scalars to represent data within the collection(s).
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.03375741466879845, -0.033944129943847656, -0.017114445567131042, -0.017170077189803123, -0.004807525314390659, -0.005820518359541893, 0.0037084852810949087, 0.016908280551433563, -0.0303354412317276, 0.004149143118411303, 0.02710813283920288, -0.054124634712934494, 0.03268357366323471, 0.013080369681119919, 0.006505101453512907, 0.03015252575278282, -0.04127097502350807, 0.019565436989068985, -0.03381585702300072, 0.013627334497869015, 0.0021155020222067833, -0.021142464131116867, -0.038200609385967255, -0.06640856713056564, 0.007606959901750088, 0.07108282297849655, -0.0032871589064598083, -0.03899453952908516, -0.0464060977101326, -0.21025581657886505, -0.0033461498096585274, -0.041433461010456085, 0.05894740670919418, -0.04672049358487129, -0.0032577200327068567, -0.03206676244735718, -0.0046697864308953285, 0.049611832946538925, -0.05527818948030472, 0.042254216969013214, 0.08312803506851196, 0.010529512539505959, -0.015650803223252296, -0.04196420684456825, -0.018998993560671806, -0.055033180862665176, -0.022164462134242058, 0.02801644243299961, 0.01953398995101452, -0.039120983332395554, 0.02265251614153385, -0.06543019413948059, -0.028353508561849594, 0.010430109687149525, 0.030109720304608345, 0.07979139685630798, 0.0665191262960434, 0.03691348806023598, 0.025602074339985847, 0.007856636308133602, 0.038773953914642334, 0.031661033630371094, -0.15941351652145386, 0.09617495536804199, 0.009282812476158142, 0.09027322381734848, -0.01197837945073843, -0.03747403249144554, 0.06170187518000603, 0.0019220315152779222, -0.015609810128808022, 0.019390547648072243, 0.005038632079958916, 0.04428744316101074, 0.023552335798740387, 0.015062767080962658, -0.020321743562817574, -0.032891131937503815, 0.0224416796118021, 0.02192833088338375, -0.035837698727846146, -0.051826708018779755, -0.008441636338829994, 0.028947854414582253, -0.0382780097424984, -0.056244857609272, 0.013238544575870037, -0.033652883023023605, 0.00997447595000267, 0.030950957909226418, -0.021536916494369507, 0.006148502696305513, 0.012749127112329006, 0.06522417813539505, -0.09203696995973587, 0.004763106349855661, 0.018624616786837578, 0.015415741130709648, -0.019450556486845016, 0.24159373342990875, -0.029663175344467163, 0.05063202232122421, 0.022449538111686707, -0.009555215947329998, -0.008067366667091846, -0.07081089913845062, 0.0007923735538497567, -0.02841532975435257, 0.016258275136351585, 0.03310440108180046, -0.0035977759398519993, -0.03644660860300064, -0.002037076046690345, -0.09200012683868408, 0.011307625100016594, -0.0025739215780049562, -0.020160283893346786, 0.022293150424957275, -0.027106812223792076, -0.00028836927958764136, -0.013831766322255135, 0.029085971415042877, 0.022309131920337677, 0.0081147700548172, 0.04722783714532852, -0.03574889153242111, 0.02854042500257492, 0.06764452159404755, 0.045976657420396805, 0.020663795992732048, 0.05031147971749306, 0.014866436831653118, -0.07498832792043686, -0.03150058537721634, -0.003817033488303423, -0.030280305072665215, 0.023516958579421043, 0.01089395210146904, 0.01327365543693304, 0.032688893377780914, -0.03162195533514023, -0.0633571594953537, -0.026541434228420258, -0.07402569055557251, -0.03319322317838669, 0.11617792397737503, -0.027815794572234154, 0.068696528673172, -0.09256871044635773, -0.02102813869714737, 0.007012940477579832, 0.0425020270049572, -0.03577912971377373, -0.0039265831001102924, 0.009266779758036137, 0.06057476997375488, 0.025105062872171402, 0.042040418833494186, -0.019653670489788055, 0.008120511658489704, -0.031287845224142075, -0.0388752818107605, -0.044314246624708176, 0.11807017773389816, 0.004360698163509369, -0.12743254005908966, -0.01240171305835247, 0.04155919700860977, 0.012178882025182247, 0.0014416496269404888, -0.019637946039438248, 0.040726982057094574, -0.07931795716285706, 0.016205403953790665, 0.1201922595500946, -0.00911658350378275, -0.05371863394975662, -0.01870063878595829, 0.00035708045470528305, 0.005198402795940638, -0.0017337111057713628, -0.019903654232621193, -0.06139300391077995, 0.0033178371377289295, -0.0006865201285108924, -0.0466044619679451, -0.02855844609439373, -0.036240354180336, 0.023839076980948448, 0.04245823249220848, -0.040163617581129074, 0.04582880809903145, -0.021913710981607437, 0.00010835497960215434, -0.03346826881170273, -0.07309441268444061, -0.01670343615114689, -0.020511599257588387, 0.005596674978733063, -0.03468409180641174, 0.0642557293176651, 0.020612837746739388, -0.024181528016924858, 0.035791195929050446, -0.028099915012717247, 0.012256475165486336, -0.02859668992459774, -0.009715254418551922, 0.02449166774749756, -0.010054952464997768, -0.011575492098927498, 0.013421827927231789, 0.033076971769332886, -0.00750706298276782, -0.03494976833462715, -0.0085337208583951, 0.03892829269170761, 0.018064623698592186, 0.0028750530909746885, 0.060479819774627686, 0.014183231629431248, -0.06384255737066269, -0.0476352833211422, -0.256113201379776, 0.0314597524702549, -0.023727141320705414, 0.031166905537247658, 0.036621417850255966, -0.04675649479031563, 0.021987566724419594, -0.0437946654856205, -0.056436777114868164, 0.0693572610616684, 0.11153236031532288, 0.010783273726701736, -0.01566382870078087, 0.022533034905791283, -0.03506684675812721, 0.06534530222415924, 0.026157321408391, 0.043480608612298965, -0.03623693808913231, -0.020310794934630394, 0.029966533184051514, -0.0019902861677110195, 0.026312919333577156, -0.07842031121253967, 0.023246735334396362, 0.029782868921756744, 0.21103385090827942, 0.01820545271039009, -0.00852129515260458, -0.021188808605074883, 0.06827006489038467, 0.0032779520843178034, -0.05210719257593155, -0.14227677881717682, 0.03278282657265663, 0.015348775312304497, -0.005826846696436405, 0.005224868655204773, 0.004620993044227362, -0.01975370943546295, -0.041246943175792694, -0.012391204945743084, 0.020974144339561462, -0.0803569108247757, -0.0071141901426017284, 0.007439206354320049, -0.02598549798130989, 0.015500546433031559, -0.06684426963329315, 0.04946671426296234, -0.009716839529573917, 0.008394635282456875, 0.04724819213151932, 0.04089741036295891, -0.05027183145284653, -0.057228974997997284, -0.09064024686813354, 0.0447019599378109, -0.027372485026717186, 0.06068674474954605, 0.03258557617664337, 0.010627524927258492, -0.000686521059833467, -0.0505378358066082, 0.032881516963243484, -0.028229324147105217, -0.03255995362997055, -0.03593822196125984, 0.024213124066591263, -0.07192359119653702, 0.01566752977669239, 0.05442710593342781, -0.008080604486167431, 0.03627976030111313, 0.021416598930954933, 0.027256112545728683, 0.012962386012077332, -0.007250318769365549, -0.04010862484574318, -0.06219649687409401, -0.00002689017856027931, -0.04172981157898903, 0.02584216184914112, 0.061043329536914825, 0.04225435480475426, 0.08051607757806778, 0.07194386422634125, -0.009488392621278763, 0.023291537538170815, -0.03144429996609688, 0.008916993625462055, -0.001425888272933662, -0.019980257377028465, -0.038658857345581055, 0.01210414431989193, -0.0003032033855561167, -0.2860144078731537, 0.03555561229586601, -0.0019640717655420303, 0.06347508728504181, -0.013001471757888794, 0.01769322343170643, 0.06084974482655525, 0.04096551984548569, -0.009793474338948727, -0.032820116728544235, 0.07364951074123383, 0.05942593514919281, 0.055340591818094254, 0.011523219756782055, 0.01686091348528862, 0.06380436569452286, 0.03548118472099304, -0.027623970061540604, 0.0027373707853257656, -0.059828631579875946, 0.0282164067029953, 0.04557501897215843, 0.21935220062732697, -0.001135587110184133, 0.030470723286271095, 0.06209858879446983, 0.016481487080454826, 0.023520980030298233, 0.051416464149951935, 0.0024249365087598562, -0.012919948436319828, -0.001922411611303687, 0.08563262969255447, -0.010845603421330452, 0.06307867169380188, 0.08590760082006454, -0.0202726311981678, 0.045020509511232376, 0.04388515278697014, -0.045700397342443466, -0.07117648422718048, 0.019034190103411674, 0.0062497453764081, 0.026703553274273872, 0.10367357730865479, -0.051062390208244324, -0.01627911813557148, -0.06698253005743027, -0.040293462574481964, 0.007872918620705605, -0.06323716044425964, -0.03334447368979454, 0.0028660804964601994, -0.040709417313337326, -0.015273756347596645, 0.03716947138309479, -0.004516565706580877, -0.002402861835435033, -0.018572021275758743, -0.03128894791007042, 0.04254469275474548, -0.08505174517631531, -0.0208442285656929, 0.022305885329842567, -0.03434458747506142 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
It's important to consider that in cases where you possess pre-existing documents in your collection, not all fields are applicable to every document. Let’s work under the assumption that you have no existing documents and want to create a new collection for `users`. Using the Grafbase TypeScript SDK, we can write the schema for each user model. It looks something like this: ```ts const address = g.type('Address', { street: g.string().mapped('street_name') }) mongodb .model('User', { name: g.string(), email: g.string().optional(), address: g.ref(address) }) .collection('users') ``` This schema will generate a fully working GraphQL API with queries and mutations as well as all input types for pagination, ordering, and filtering:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.05429348349571228, 0.013072926551103592, 0.0013313607778400183, -0.04195773974061012, 0.04100897163152695, 0.010005906224250793, -0.006218921858817339, 0.012553784996271133, -0.01156857330352068, 0.013234520331025124, 0.011654912494122982, -0.043243974447250366, 0.026640960946679115, 0.01438869908452034, -0.0007613209309056401, 0.021734412759542465, -0.05175304785370827, 0.008970825001597404, -0.04226355627179146, 0.028669806197285652, 0.03659818321466446, -0.017739199101924896, -0.04719197377562523, -0.04575497657060623, 0.015192941762506962, 0.06851968914270401, -0.005821914412081242, 0.0017960951663553715, -0.026334814727306366, -0.2146524339914322, -0.02949405461549759, -0.03531673550605774, 0.0366767980158329, -0.004735991358757019, 0.014583459123969078, -0.06869354099035263, -0.02222244255244732, 0.06926941871643066, -0.026214731857180595, 0.07072672247886658, 0.0641147568821907, -0.0013047836255282164, -0.02703837864100933, -0.05514801666140556, -0.017309056594967842, -0.060550104826688766, -0.026890289038419724, -0.027296312153339386, 0.00203475053422153, -0.047579098492860794, 0.00010282881703460589, -0.08411622047424316, -0.0183420293033123, 0.03262442350387573, 0.03417405113577843, 0.035739168524742126, 0.05740518867969513, -0.010176414623856544, 0.043944548815488815, -0.0024676071479916573, 0.046656254678964615, 0.025651350617408752, -0.11115127801895142, 0.077427938580513, 0.01658489555120468, 0.09951160848140717, -0.07314935326576233, -0.029738774523139, 0.04394714534282684, 0.010901606641709805, -0.002933772513642907, 0.03737664967775345, 0.02528945356607437, 0.05465056374669075, 0.029215911403298378, -0.009678423404693604, -0.03627936169505119, -0.03607425466179848, 0.012414312921464443, 0.02153829298913479, -0.04907570406794548, -0.07269862294197083, -0.008554364554584026, 0.017220692709088326, -0.041361525654792786, -0.08368071168661118, 0.015642765909433365, -0.057618480175733566, -0.005751038435846567, 0.048800691962242126, 0.02315680682659149, -0.01919618435204029, 0.04561862722039223, 0.06392398476600647, -0.08612915873527527, 0.005390198901295662, -0.0009362438577227294, 0.01957346871495247, -0.0034974331501871347, 0.23680685460567474, -0.021137427538633347, 0.0349675677716732, 0.04425948113203049, 0.009740162640810013, -0.0038883022498339415, -0.041528645902872086, -0.013702187687158585, -0.05035652220249176, 0.01833898387849331, 0.010616181418299675, -0.02790713869035244, -0.02550159953534603, 0.013957873918116093, -0.08685649186372757, -0.021685326471924782, -0.0015918294666334987, 0.0285763218998909, 0.05569243058562279, -0.006042292341589928, -0.0065538762137293816, -0.02285548858344555, 0.06260544806718826, 0.021171336993575096, -0.008204706944525242, 0.02543788217008114, -0.03401583433151245, 0.03347188979387283, 0.044690921902656555, 0.037111055105924606, 0.048663429915905, 0.05505470931529999, 0.018162349238991737, -0.05974774435162544, -0.03140315040946007, -0.012286011129617691, -0.041363559663295746, -0.019137566909193993, -0.004476616159081459, 0.026087293401360512, 0.061653535813093185, 0.0009706420241855085, -0.05216830596327782, -0.04570988938212395, -0.03399156406521797, -0.043142884969711304, 0.11562716960906982, -0.004703531973063946, 0.03453678637742996, -0.07722432911396027, 0.0055565182119607925, 0.002063614083454013, 0.05792862921953201, -0.05724882334470749, -0.005319013725966215, 0.0029568045865744352, 0.02248881384730339, 0.023798011243343353, 0.028445832431316376, -0.04874797165393829, 0.02535463497042656, -0.021678578108549118, 0.002669375156983733, -0.05479834973812103, 0.11268941313028336, -0.013924053870141506, -0.11039388179779053, -0.016628175973892212, 0.018357280641794205, -0.009010199457406998, -0.024528546258807182, -0.022288162261247635, -0.00283384183421731, -0.07686583697795868, 0.005942860152572393, 0.10912308096885681, 0.02646714635193348, -0.07078415900468826, -0.026698678731918335, -0.003109597833827138, -0.0016066855750977993, -0.010465431027114391, -0.00020099290122743696, -0.03944189101457596, -0.007862609811127186, 0.031153947114944458, -0.019602281972765923, -0.014133728109300137, -0.01718597114086151, 0.07052967697381973, 0.03652406856417656, 0.010368766263127327, 0.03128157928586006, -0.011447462253272533, -0.0015860769199207425, -0.03087834268808365, -0.05673443526029587, -0.04667449742555618, -0.031044378876686096, 0.05142290145158768, -0.03474041074514389, 0.06228059157729149, 0.01628025434911251, 0.0075027914717793465, 0.02248694747686386, -0.015143979340791702, 0.030949510633945465, -0.02310335263609886, -0.015804624184966087, 0.021970286965370178, -0.0027114879339933395, -0.06293638050556183, 0.005470631644129753, 0.04438193514943123, 0.015963401645421982, -0.011509020812809467, -0.01361395325511694, 0.0385458804666996, -0.01567244529724121, 0.05053595453500748, 0.009314059279859066, 0.01029917225241661, -0.0430137999355793, -0.0375792495906353, -0.27590668201446533, 0.005321870557963848, -0.04476114362478256, 0.01372466143220663, 0.023601960390806198, -0.056273140013217926, 0.006217813119292259, -0.026082223281264305, -0.041034478694200516, 0.10704752057790756, 0.07247104495763779, 0.019122600555419922, -0.0147742610424757, 0.053155817091464996, -0.02911912463605404, 0.062386561185121536, 0.024600794538855553, -0.010983970947563648, -0.043029800057411194, -0.010086280293762684, -0.007326132617890835, 0.01627296395599842, -0.0000891847230377607, -0.10407395660877228, 0.04362022504210472, 0.012556176632642746, 0.22957439720630646, 0.03577850013971329, -0.01303535420447588, -0.019680848345160484, 0.06634106487035751, -0.043230243027210236, -0.02157682739198208, -0.09391908347606659, 0.04388490319252014, 0.035262804478406906, -0.01172170415520668, 0.003891183063387871, 0.03937672823667526, -0.047809090465307236, -0.005221208557486534, 0.003923713695257902, -0.0013067439431324601, -0.08775840699672699, -0.02136770263314247, -0.02844405360519886, -0.07283329963684082, 0.00881089549511671, -0.03936900198459625, 0.048148516565561295, -0.002041933359578252, 0.01861732080578804, 0.047669898718595505, 0.04363801330327988, -0.043144986033439636, -0.04646845906972885, -0.0746343806385994, 0.02543017826974392, -0.03674113750457764, 0.0546790286898613, 0.012737185694277287, 0.008552968502044678, -0.003124186070635915, -0.02347761020064354, 0.028971802443265915, -0.023212553933262825, -0.02335553802549839, -0.021785279735922813, 0.004961736965924501, -0.09161225706338882, 0.008239636197686195, 0.0763251781463623, -0.003966830670833588, 0.05043919384479523, 0.0168596263974905, 0.046757712960243225, 0.0025516666937619448, 0.015778550878167152, -0.04086626321077347, -0.051304757595062256, 0.016846606507897377, -0.03276316449046135, 0.06895086169242859, 0.05516979843378067, 0.026780609041452408, 0.0518377311527729, 0.04972510039806366, 0.00999041460454464, 0.03166079893708229, -0.028866229578852654, -0.009111477993428707, 0.024035323411226273, -0.047992732375860214, -0.0360480472445488, 0.0017346125096082687, -0.03339163213968277, -0.2746506929397583, 0.031669944524765015, 0.03591092303395271, 0.027674470096826553, 0.007740734610706568, 0.05012547969818115, 0.04365898668766022, 0.002777375280857086, -0.000266847520833835, -0.00047825369983911514, 0.04201817885041237, 0.05561847612261772, 0.048632048070430756, 0.005827987100929022, -0.010763847269117832, 0.04613916948437691, 0.048048295080661774, -0.02545217052102089, 0.06443604826927185, -0.09722988307476044, 0.02768598683178425, 0.05381086841225624, 0.26153719425201416, 0.007663946598768234, 0.03431905806064606, 0.07725196331739426, 0.016626540571451187, -0.0038848768454045057, 0.02978719212114811, 0.05195286497473717, 0.00824965164065361, 0.00962846726179123, 0.09888322651386261, 0.0017125069862231612, 0.04692647233605385, 0.042787857353687286, -0.002825530245900154, 0.029045505449175835, 0.009711384773254395, -0.06246553361415863, -0.11296860873699188, -0.012461709789931774, -0.0347265750169754, -0.023832576349377632, 0.09282391518354416, -0.04639289900660515, -0.03873739019036293, -0.04306728392839432, -0.02739126980304718, 0.0029731302056461573, -0.04693064093589783, -0.04935471713542938, -0.014423341490328312, -0.018804054707288742, 0.024796107783913612, 0.0466051809489727, -0.009214228950440884, 0.0028799676802009344, -0.028549959883093834, -0.0190972201526165, 0.03097437135875225, -0.027162889018654823, -0.04418741911649704, 0.028975943103432655, -0.00020546323503367603 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
This schema will generate a fully working GraphQL API with queries and mutations as well as all input types for pagination, ordering, and filtering: - `userCreate` – Create a new user - `userCreateMany` – Batch create new users - `userUpdate` – Update an existing user - `userUpdateMany` – Batch update users - `userDelete` – Delete a user - `userDeleteMany` – Batch delete users - `user` – Fetch a single user record - `userCollection` – Fetch multiple users from a collection MongoDB automatically generates collections when you first store data, so there’s no need to manually create a collection for users at this step. We’re now ready to start the Grafbase development server using the CLI: ```bash npx grafbase dev ```
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.04429103806614876, 0.0030695730820298195, -0.0010024664225056767, -0.047095879912376404, 0.020874353125691414, 0.016409657895565033, 0.0023989833425730467, 0.02798275463283062, -0.019348371773958206, 0.014236866496503353, 0.01740475744009018, -0.06229391321539879, 0.0627003014087677, 0.013415040448307991, -0.008063498884439468, 0.034517403692007065, -0.053409211337566376, 0.0010232393397018313, -0.02333068661391735, 0.014282423071563244, 0.02876589074730873, -0.020343609154224396, -0.05129421502351761, -0.06525637209415436, 0.012598177418112755, 0.062295716255903244, -0.005682237911969423, -0.01926570013165474, -0.06660731881856918, -0.19977368414402008, -0.004400528967380524, -0.006905070040374994, 0.06986548006534576, -0.07193585485219955, 0.008270774967968464, -0.05807597190141678, 0.00005099748887005262, 0.04507911205291748, -0.024638401344418526, 0.07686125487089157, 0.08632213622331619, -0.013280652463436127, -0.03444090485572815, -0.03942018002271652, -0.018371203914284706, -0.06000325828790665, -0.04286710545420647, -0.019825251772999763, 0.011521031148731709, -0.042770542204380035, -0.006816151086241007, -0.08072719722986221, 0.018331699073314667, 0.03503375127911568, 0.05607418343424797, 0.034435708075761795, 0.07430396229028702, 0.034825101494789124, 0.024692386388778687, 0.0054838042706251144, 0.03971375897526741, 0.005730929784476757, -0.1580583155155182, 0.0822250247001648, 0.007780309766530991, 0.053500015288591385, -0.027702663093805313, -0.047613486647605896, 0.0485115721821785, 0.017436809837818146, -0.020619051530957222, 0.04277675598859787, 0.020853934809565544, 0.05245550349354744, 0.04322762414813042, -0.01007914636284113, -0.03883218392729759, -0.05075547844171524, 0.0065939039923250675, 0.009939799085259438, -0.06369481235742569, -0.08530888706445694, -0.02468240074813366, -0.011308744549751282, -0.03849364072084427, -0.07473742961883545, 0.019418757408857346, -0.0210151094943285, 0.00007705797179369256, 0.05094391107559204, -0.0022577387280762196, 0.003684484865516424, 0.038616426289081573, 0.05369321629405022, -0.08339916169643402, 0.024435516446828842, 0.017083190381526947, 0.026194585487246513, -0.016734538599848747, 0.23815231025218964, 0.005726874805986881, 0.028001708909869194, 0.012702817097306252, -0.01634890027344227, 0.0013894595904275775, -0.039031244814395905, 0.005356984678655863, -0.047718346118927, 0.01155846193432808, 0.022265223786234856, -0.018174394965171814, -0.024870943278074265, 0.03732755407691002, -0.0734090730547905, -0.0007563485414721072, 0.012274779379367828, 0.03116493858397007, 0.04209813103079796, -0.01283334568142891, 0.009193573147058487, -0.008065780624747276, 0.05772131681442261, 0.01995236426591873, -0.014595020562410355, 0.04956234619021416, -0.022183114662766457, 0.042541686445474625, 0.06583833694458008, 0.00967148132622242, 0.03525214269757271, 0.06239570677280426, 0.04177442565560341, -0.051741138100624084, -0.022217120975255966, -0.005091552156955004, 0.0008671453106217086, 0.016469523310661316, -0.007942701689898968, 0.011026749387383461, 0.014393757097423077, -0.02236432582139969, -0.06105348467826843, -0.0410640612244606, -0.09265805780887604, -0.03346572816371918, 0.08983512222766876, -0.000937144155614078, 0.02354714274406433, -0.0942770466208458, 0.007307275664061308, -0.0275620985776186, 0.06429579108953476, -0.024964414536952972, -0.03594209998846054, -0.006489022634923458, 0.04290539398789406, 0.028939908370375633, 0.03286396339535713, -0.03908856213092804, 0.03221292048692703, -0.03425111249089241, -0.04200388863682747, -0.053171198815107346, 0.10357588529586792, 0.0017337696626782417, -0.12277426570653915, -0.02385365404188633, 0.015170035883784294, 0.007692983839660883, 0.014027807861566544, -0.004050775431096554, 0.007077094633132219, -0.09904757887125015, -0.0007772472454234958, 0.0735524520277977, 0.027309462428092957, -0.04428590089082718, -0.011882883496582508, 0.006054585799574852, -0.018724236637353897, -0.004660478793084621, 0.003961209207773209, -0.05231989175081253, -0.014050622470676899, 0.007125296164304018, -0.012200129218399525, -0.0033116431441158056, -0.008080882951617241, 0.08014971762895584, 0.03810448944568634, -0.02030758000910282, 0.036770787090063095, -0.01949881948530674, -0.00182845420204103, -0.02837594971060753, -0.07185985147953033, -0.03718797490000725, -0.028929073363542557, 0.025989390909671783, -0.03638378903269768, 0.08311339467763901, 0.00037463163607753813, -0.0032503586262464523, 0.020580386742949486, -0.005768182221800089, 0.0375526025891304, -0.033744800835847855, -0.013111844658851624, 0.02425576187670231, 0.0055045317858457565, -0.04586968570947647, 0.0070368219166994095, 0.022996095940470695, 0.008852618746459484, -0.03762903809547424, -0.029561929404735565, 0.02550412528216839, -0.011144109070301056, 0.05946609005331993, 0.03607560321688652, 0.012074150145053864, -0.01657390594482422, -0.026964660733938217, -0.25341418385505676, 0.0013684798032045364, -0.010317733511328697, 0.010494614951312542, 0.029218699783086777, -0.0323408842086792, 0.00830388255417347, -0.046088483184576035, -0.003684626193717122, 0.09557598829269409, 0.07239091396331787, -0.00719488738104701, -0.008743587881326675, 0.04986344277858734, -0.02932405099272728, 0.07096539437770844, 0.024053167551755905, 0.01788022369146347, -0.04076136276125908, -0.05602147430181503, 0.008080528117716312, 0.031805265694856644, 0.032228365540504456, -0.09686639159917831, 0.02744634822010994, 0.044659920036792755, 0.2067633420228958, 0.0581558421254158, 0.0063218409195542336, 0.0031618913635611534, 0.07315417379140854, -0.024018753319978714, -0.05548059940338135, -0.11996430903673172, 0.04996873438358307, 0.07533799856901169, -0.017718162387609482, -0.028341468423604965, 0.022750182077288628, -0.01658029668033123, -0.014001398347318172, -0.012424848042428493, 0.01378390472382307, -0.09611305594444275, -0.004415410570800304, -0.02170959673821926, -0.03232026472687721, 0.033362891525030136, -0.04095441848039627, 0.02212241291999817, 0.01705862022936344, -0.012919683940708637, 0.052424944937229156, 0.017076989635825157, -0.017644887790083885, -0.08725056797266006, -0.06994415819644928, 0.03719659149646759, -0.013708150945603848, 0.04944147914648056, -0.007826440967619419, -0.024617191404104233, -0.00801866315305233, -0.034699447453022, 0.022300805896520615, -0.02697398141026497, -0.004205480217933655, 0.0010499469935894012, 0.031157877296209335, -0.10239528864622116, 0.015870628878474236, 0.06401029229164124, -0.019775107502937317, 0.052622415125370026, 0.022147348150610924, 0.06412984430789948, -0.012244784273207188, -0.002465552883222699, -0.042920056730508804, -0.06560008972883224, 0.017416030168533325, -0.04343821480870247, 0.05717978626489639, 0.05569073185324669, 0.0447782501578331, 0.02580009587109089, 0.06508564203977585, -0.0018996016588062048, 0.0323043093085289, -0.017766039818525314, 0.011453741230070591, 0.01319565623998642, -0.06528935581445694, -0.060057032853364944, -0.015224532224237919, -0.005100911948829889, -0.3066633641719818, 0.03179231658577919, -0.01495162583887577, 0.04002058878540993, 0.012084821239113808, 0.03951442614197731, 0.0381501130759716, 0.04173053056001663, -0.00027560419403016567, -0.007820216938853264, 0.052855245769023895, 0.05339168384671211, 0.03976276144385338, 0.033288005739450455, 0.0018076406558975577, 0.043492965400218964, 0.025579899549484253, -0.053249649703502655, 0.04353483021259308, -0.05755406990647316, 0.016045859083533287, 0.027041342109441757, 0.21919256448745728, 0.017544401809573174, 0.05439610406756401, 0.0672510415315628, -0.0006504779448732734, -0.005248524714261293, 0.039003342390060425, 0.008068373426795006, -0.029461534693837166, 0.026203975081443787, 0.08648774027824402, -0.005288400687277317, 0.04137769341468811, 0.06969206035137177, -0.023871099576354027, 0.024840332567691803, 0.01143183559179306, -0.04527343437075615, -0.12374990433454514, 0.007131138350814581, -0.005118653178215027, 0.010926921851933002, 0.11673840880393982, -0.05339457467198372, -0.030720345675945282, -0.06453891843557358, 0.012032458558678627, 0.017568856477737427, -0.05003119260072708, -0.04587457701563835, -0.012522031553089619, -0.01279780175536871, 0.02054430916905403, 0.04025403782725334, -0.01644420064985752, 0.0070973169058561325, -0.027461346238851547, -0.029999300837516785, 0.03480610251426697, -0.04130844399333, -0.026451069861650467, 0.00956677459180355, -0.021192729473114014 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
We’re now ready to start the Grafbase development server using the CLI: ```bash npx grafbase dev ``` This command runs the entire Grafbase GraphQL API locally that you can use when developing your front end. The Grafbase API communicates directly with your Atlas Data API. Once the command is running, you’ll be able to visit http://127.0.0.1:4000 and explore the GraphQL API. ## Insert users with GraphQL to MongoDB instance Let’s test out creating users inside our MongoDB collection using the generated `userCreate` mutation that was provided to us by Grafbase. Using Pathfinder at http://127.0.0.1:4000, execute the following mutation:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.06417394429445267, -0.02632194757461548, -0.004139021970331669, -0.032131195068359375, 0.01252369862049818, -0.013693425804376602, 0.002537115477025509, 0.02528579719364643, -0.03510201722383499, -0.0057494547218084335, 0.02860289067029953, -0.05519753694534302, 0.04138803854584694, -0.006301006302237511, 0.005001875571906567, 0.019851790741086006, -0.05691128224134445, 0.007187750190496445, -0.033162835985422134, 0.016283271834254265, -0.009271803312003613, -0.023889891803264618, -0.028774214908480644, -0.09510175883769989, -0.004904936067759991, 0.06985694915056229, -0.008889686316251755, -0.03396405279636383, -0.03741014003753662, -0.2027703821659088, 0.02736905962228775, -0.01671333611011505, 0.04804272949695587, -0.054111965000629425, 0.0035385997034609318, -0.023311149328947067, 0.02455717884004116, 0.03253354877233505, -0.04104689508676529, 0.04497052729129791, 0.10129136592149734, -0.017686037346720695, -0.0068238223902881145, -0.017751723527908325, -0.007625245489180088, -0.07490045577287674, -0.01967339776456356, 0.0017576647223904729, 0.023076964542269707, -0.020081477239727974, 0.00752028776332736, -0.09315688908100128, 0.03946172073483467, 0.02360566332936287, 0.03344883769750595, 0.05996006727218628, 0.07572294026613235, 0.04155835509300232, 0.037201788276433945, 0.01922246441245079, 0.032590121030807495, -0.0019461266929283738, -0.17656856775283813, 0.07508961856365204, 0.019508710131049156, 0.0760008916258812, -0.005289663560688496, -0.06650808453559875, 0.03735722601413727, -0.008085507899522781, -0.03086210787296295, 0.039014916867017746, 0.04238985851407051, 0.05025143176317215, 0.032359715551137924, 0.0052926805801689625, -0.04420364648103714, -0.03878998011350632, 0.022235434502363205, -0.02824065089225769, -0.010665372014045715, -0.07129887491464615, -0.016512861475348473, 0.019198749214410782, -0.05684433504939079, -0.0539117231965065, 0.0227719284594059, 0.009085740894079208, 0.0359175018966198, 0.04551732540130615, -0.017469948157668114, -0.02019459940493107, 0.009420809336006641, 0.031783588230609894, -0.09308790415525436, 0.020851489156484604, 0.04089130833745003, -0.007798795122653246, -0.029163796454668045, 0.24237659573554993, 0.0023413551971316338, 0.04101364314556122, -0.003049077233299613, 0.001041291281580925, 0.016348373144865036, -0.04137326404452324, 0.0012128280941396952, -0.0291959997266531, -0.0004643760621547699, 0.04666654393076897, -0.005966933444142342, -0.014793102629482746, 0.035560790449380875, -0.08195199072360992, -0.00476885586977005, 0.0057638585567474365, 0.0036640213802456856, 0.03534475713968277, -0.040551163256168365, 0.007348315324634314, -0.003070992883294821, 0.02466927096247673, 0.02867070585489273, -0.013033353723585606, 0.056958917528390884, -0.011225024238228798, 0.028756771236658096, 0.06666888296604156, 0.020993083715438843, 0.03487509489059448, 0.053811587393283844, 0.017773376777768135, -0.05527650937438011, 0.0003826071915682405, -0.006116652395576239, -0.00008535815140930936, -0.012487578205764294, 0.0034106664825230837, -0.011083844117820263, 0.01370646059513092, -0.020277610048651695, -0.058663707226514816, -0.042743511497974396, -0.07499008625745773, -0.03756732493638992, 0.062139738351106644, -0.01502269133925438, 0.07336867600679398, -0.07446794211864471, -0.019729549065232277, -0.011355595663189888, 0.054773736745119095, -0.05184365063905716, -0.008755838498473167, -0.030023515224456787, 0.05719311907887459, 0.038196492940187454, 0.06289082020521164, -0.018698351457715034, 0.000018479031496099196, -0.01178027130663395, -0.05819565802812576, -0.04112305864691734, 0.10666634887456894, 0.011499202810227871, -0.12463918328285217, -0.038755856454372406, 0.014652024023234844, 0.02658274956047535, 0.012227965518832207, -0.04011163488030434, 0.004061924759298563, -0.07316996902227402, -0.04247775301337242, 0.08624739944934845, 0.0009129638783633709, -0.051031675189733505, 0.0052029225043952465, 0.016763923689723015, -0.0012441882863640785, -0.0026718759909272194, -0.0047354670241475105, -0.052536945790052414, -0.01855793222784996, -0.003361204406246543, -0.04750937223434448, -0.020669911056756973, -0.013750840909779072, 0.05553864315152168, 0.03355439379811287, -0.029138008132576942, 0.0477709136903286, -0.03769043833017349, -0.00430487934499979, -0.02307814173400402, -0.06427573412656784, -0.01817389205098152, -0.005857472307980061, 0.03217568248510361, -0.029769103974103928, 0.10202917456626892, 0.009420760907232761, 0.0016844964120537043, 0.04692353308200836, -0.008363879285752773, 0.016195163130760193, -0.01474311389029026, -0.017593812197446823, 0.04012899845838547, 0.022558612748980522, -0.03358166664838791, -0.014810014516115189, 0.030268048867583275, 0.004903975408524275, -0.04125049710273743, -0.010554813779890537, 0.0253792442381382, 0.016768086701631546, 0.04938230663537979, 0.04667183384299278, 0.011514917947351933, -0.017110032960772514, -0.048416782170534134, -0.26989924907684326, 0.011197029612958431, -0.008993884548544884, 0.02616877295076847, 0.038146257400512695, -0.0351472869515419, 0.03012693300843239, -0.037483204156160355, -0.0052750189788639545, 0.0826706737279892, 0.10453371703624725, -0.002241933485493064, -0.007991580292582512, 0.04325028508901596, -0.025656683370471, 0.06901323050260544, 0.02826148085296154, 0.017335576936602592, -0.01993742026388645, -0.04097960144281387, 0.03213748708367348, -0.0014526847517117858, 0.010531159117817879, -0.08443190902471542, 0.028568122535943985, 0.03497612476348877, 0.19181403517723083, 0.05418023839592934, 0.010682367719709873, -0.013009018264710903, 0.07019812613725662, -0.020543454214930534, -0.06732220947742462, -0.16119441390037537, 0.0359111949801445, 0.0591990202665329, 0.0025143478997051716, -0.018380405381321907, 0.00966895092278719, -0.012508350424468517, -0.03412611037492752, -0.01551660057157278, 0.024988431483507156, -0.0855274423956871, -0.018946120515465736, -0.019426070153713226, -0.02982887625694275, 0.012578156776726246, -0.05761145055294037, 0.022847529500722885, 0.011842027306556702, 0.0012267939746379852, 0.04239402711391449, 0.03230598568916321, -0.04028668627142906, -0.08485569804906845, -0.07406143844127655, 0.03336769714951515, -0.006677660625427961, 0.04245949164032936, 0.01897321827709675, -0.01059847790747881, 0.01205508504062891, -0.036188755184412, 0.032167088240385056, -0.03535287082195282, -0.009316425770521164, -0.008231813088059425, 0.06658457964658737, -0.08726678788661957, 0.009252069517970085, 0.06951568275690079, -0.018102828413248062, 0.035064224153757095, 0.017985288053750992, 0.039391692727804184, -0.010100715793669224, -0.003919378388673067, -0.03839736059308052, -0.05432073771953583, 0.004266155418008566, -0.03889349848031998, 0.050656288862228394, 0.04964478313922882, 0.036542970687150955, 0.03518049791455269, 0.05693637207150459, -0.010323924012482166, 0.031845610588788986, -0.009749478660523891, 0.021878961473703384, -0.0017459833761677146, -0.028486531227827072, -0.07629188895225525, -0.01122631411999464, 0.00010778268915601075, -0.29479482769966125, 0.04180494695901871, 0.007836353965103626, 0.015746096149086952, -0.014368743635714054, 0.01822575554251671, 0.05998609960079193, 0.04170273616909981, -0.03557680547237396, -0.004801291041076183, 0.07135915011167526, 0.047866396605968475, 0.0504959337413311, 0.03546471148729324, 0.021484315395355225, 0.04431750997900963, 0.05026337876915932, -0.03877894952893257, 0.018321439623832703, -0.08556409925222397, 0.015126855112612247, 0.024685366079211235, 0.23019249737262726, 0.007109961938112974, 0.050531018525362015, 0.07179433852434158, 0.0015010980423539877, 0.02051648125052452, 0.04304692894220352, 0.011698578484356403, -0.00930949579924345, 0.02647807076573372, 0.054279133677482605, -0.016649657860398293, 0.04394268989562988, 0.08881217986345291, -0.014412115328013897, 0.00907018780708313, 0.019756551831960678, -0.024760408326983452, -0.08254972100257874, 0.019012698903679848, 0.0006184516823850572, 0.022541800513863564, 0.08171740174293518, -0.04763121157884598, -0.018966224044561386, -0.06504856050014496, 0.013195095583796501, 0.001455717021599412, -0.057876985520124435, -0.04408032074570656, -0.021290278062224388, -0.053531572222709656, -0.00961373746395111, 0.05536005273461342, -0.013178414665162563, -0.0023809701669961214, -0.037391070276498795, -0.031775519251823425, 0.040417373180389404, -0.09457488358020782, 0.006392831914126873, 0.02274804562330246, -0.022277167066931725 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
Using Pathfinder at http://127.0.0.1:4000, execute the following mutation: ``` mutation { mongo { userCreate(input: { name: "Jamie Barton", email: "[email protected]", age: 40 }) { insertedId } } } ``` If everything is hooked up correctly, you should see a response that looks something like this: ```json { "data": { "mongo": { "userCreate": { "insertedId": "65154a3d4ddec953105be188" } } } } ``` You should repeat this step a few times to create multiple users. ## Update user by ID Now we’ve created some users in our MongoDB collection, let’s try updating a user by `insertedId`:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.06117311865091324, -0.0031077698804438114, 0.018838027492165565, -0.026751015335321426, 0.0010560760274529457, -0.010990395210683346, 0.03595113381743431, 0.00008211717795347795, -0.027257390320301056, 0.006800724193453789, 0.007833351381123066, -0.06216532364487648, 0.02361544407904148, -0.007560629863291979, 0.0006799221155233681, 0.012981433421373367, -0.03905041888356209, -0.0027573611587285995, -0.05120895057916641, 0.06296812742948532, 0.019624317064881325, -0.0017223248723894358, -0.004994556773453951, -0.06841306388378143, 0.020255813375115395, 0.08506547659635544, -0.015296069905161858, -0.009498505853116512, -0.0598180778324604, -0.20248305797576904, 0.0201118141412735, -0.016149718314409256, 0.02218199148774147, -0.01358840148895979, -0.02866177447140217, -0.03402126207947731, -0.01242724061012268, 0.05040249228477478, -0.0019561348017305136, 0.08336419612169266, 0.08063667267560959, -0.008431242778897285, -0.02484290488064289, -0.06948001682758331, -0.02438553422689438, -0.03130907937884331, -0.012465447187423706, -0.006922561675310135, 0.03511921316385269, -0.03373530134558678, -0.0042870864272117615, -0.08037259429693222, -0.01704886369407177, 0.048856329172849655, 0.053785037249326706, 0.03868338465690613, 0.04442831501364708, 0.034965626895427704, 0.0016598806250840425, 0.005021826364099979, 0.051842525601387024, 0.052802618592977524, -0.16241972148418427, 0.06979606300592422, 0.045408882200717926, 0.06866022944450378, -0.014289946295320988, -0.06721221655607224, 0.005107073113322258, 0.008135708048939705, -0.0357937216758728, 0.007114469539374113, 0.03801129758358002, 0.047707654535770416, 0.013602673076093197, -0.003218353958800435, -0.03456806764006615, -0.012669156305491924, 0.026335150003433228, 0.05747834965586662, -0.06736814230680466, -0.05716646462678909, -0.024875355884432793, -0.000529139710124582, -0.02186807617545128, -0.04179844260215759, 0.029574468731880188, -0.04301824793219566, 0.015114986337721348, 0.031152011826634407, -0.0044276099652051926, 0.007747642230242491, 0.02218516357243061, 0.02899259328842163, -0.11774501949548721, 0.008578253909945488, 0.004846752155572176, 0.006154285743832588, -0.05958985537290573, 0.2134004384279251, 0.002607309026643634, 0.03203703090548515, 0.01990327797830105, 0.007817180827260017, 0.005097430665045977, -0.006891490425914526, -0.01747347228229046, -0.03881251439452171, 0.0034094564616680145, 0.010958203114569187, -0.001355059095658362, 0.005925782956182957, 0.042417339980602264, -0.041449982672929764, -0.0012973368866369128, 0.04167962074279785, -0.01385955698788166, 0.043594054877758026, -0.03748885169625282, -0.003999211825430393, 0.029217824339866638, 0.027413224801421165, 0.038418952375650406, -0.009975780732929707, 0.07083728909492493, -0.023895518854260445, 0.06442002207040787, 0.09961781650781631, -0.009277538396418095, 0.050514839589595795, 0.05480348691344261, 0.016428671777248383, -0.0839243233203888, -0.014572270214557648, 0.0022314428351819515, 0.019616078585386276, -0.06076829880475998, 0.0283641517162323, 0.010055774822831154, 0.014511440880596638, -0.026002556085586548, -0.09269065409898758, -0.044641412794589996, -0.06460866332054138, 0.0026536020450294018, 0.13638272881507874, -0.014250497333705425, 0.06631137430667877, -0.07109758257865906, -0.009057305753231049, -0.03201804682612419, 0.019876664504408836, -0.06268233060836792, -0.04333873465657234, -0.03229008987545967, 0.04346439242362976, 0.06343207508325577, 0.05757898837327957, -0.011759337969124317, 0.01764773763716221, -0.028935709968209267, -0.002040639752522111, -0.05243268609046936, 0.07600413262844086, 0.053826842457056046, -0.08491579443216324, -0.004176751244813204, 0.018220925703644753, 0.013616201467812061, -0.04817594960331917, -0.006260426249355078, 0.020927544683218002, -0.08025098592042923, 0.018102241680026054, 0.10078246891498566, 0.0369759164750576, -0.04791902005672455, 0.0024155641440302134, -0.007676556706428528, 0.02459823340177536, -0.03325333446264267, -0.004344759043306112, -0.027040712535381317, -0.00034666131250560284, 0.01503723207861185, -0.04051508381962776, -0.003722687717527151, -0.0020397831685841084, 0.07596803456544876, 0.03649570792913437, -0.01630834862589836, 0.0565791018307209, 0.0016097711632028222, -0.004027870483696461, -0.051431335508823395, -0.05900128185749054, -0.03563310205936432, -0.04172088950872421, 0.0386115238070488, -0.029065318405628204, 0.04720611497759819, 0.01777735911309719, -0.0121169313788414, 0.017328128218650818, -0.027495738118886948, 0.027409782633185387, -0.008608892560005188, -0.0352606438100338, 0.05627015233039856, 0.011483768932521343, -0.02256821095943451, 0.0002460548421368003, 0.02045064978301525, -0.018444763496518135, -0.03168370947241783, -0.012204008176922798, -0.007049872074276209, 0.014933697879314423, 0.09578536450862885, 0.022853901609778404, 0.021454211324453354, -0.032393407076597214, -0.00037596470792777836, -0.26001131534576416, 0.0015672369627282023, 0.003006997983902693, -0.0009207955445162952, -0.0011549437185749412, -0.04683854430913925, 0.026091109961271286, 0.0065970937721431255, 0.010658877901732922, 0.05430009961128235, 0.050545912235975266, -0.004740393254905939, 0.02328099124133587, 0.042484454810619354, 0.0039192186668515205, 0.07001327723264694, -0.0017990124179050326, -0.003908787854015827, 0.02053152024745941, -0.031732965260744095, -0.023717142641544342, -0.007216273341327906, 0.028866775333881378, -0.09210103750228882, 0.035288915038108826, -0.0001654079824220389, 0.19767408072948456, 0.10509134829044342, -0.038362953811883926, -0.030747415497899055, 0.07027953863143921, 0.01066514477133751, -0.0191951934248209, -0.07300931215286255, 0.040788933634757996, 0.03525831550359726, 0.027322443202137947, -0.028392989188432693, 0.002383746672421694, -0.049297355115413666, -0.009070741012692451, -0.018762361258268356, 0.016209283843636513, -0.0744091346859932, -0.016845425590872765, -0.05847892537713051, -0.05606389418244362, 0.0039700414054095745, -0.042708951979875565, 0.013326803222298622, 0.03345801308751106, -0.00926430057734251, 0.08090092986822128, 0.010417480953037739, -0.052594128996133804, -0.0748266726732254, -0.07348992675542831, 0.057186517864465714, -0.028888480737805367, 0.07513312995433807, 0.004157347604632378, -0.013610700145363808, 0.026243111118674278, -0.02490411326289177, 0.037898436188697815, -0.030166830867528915, -0.011328141205012798, -0.025201838463544846, 0.05601363629102707, -0.09355402737855911, -0.0004041511274408549, 0.0550939179956913, -0.035926349461078644, 0.04041168466210365, 0.025068186223506927, 0.04380928725004196, -0.023748716339468956, -0.050537873059511185, -0.08093589544296265, -0.005907620303332806, 0.01882239244878292, -0.05162468180060387, 0.01319276262074709, 0.0612756609916687, 0.016767296940088272, -0.02144058607518673, 0.04231943190097809, 0.008213110268115997, 0.026800118386745453, -0.02792326919734478, -0.035730719566345215, -0.03383728861808777, -0.05377897247672081, -0.07833625376224518, -0.021308917552232742, -0.005102162715047598, -0.2796298861503601, 0.047223687171936035, 0.00033476337557658553, 0.01806652918457985, 0.006638416554778814, 0.07009518891572952, 0.032796382904052734, 0.009903093799948692, -0.004220591392368078, 0.006308541167527437, 0.02135910838842392, 0.03891227766871452, 0.026385046541690826, 0.05328739434480667, 0.013852303847670555, 0.0664876252412796, -0.016608770936727524, -0.07221473753452301, 0.03956054523587227, -0.12305551022291183, 0.05035950616002083, 0.05747821927070618, 0.2394830286502838, 0.018937157467007637, 0.027279071509838104, 0.08486105501651764, 0.054782506078481674, 0.06920653581619263, 0.0770215392112732, -0.03586361184716225, -0.007558154873549938, 0.02852075919508934, 0.06441016495227814, -0.04321666806936264, 0.07420359551906586, 0.053355373442173004, -0.028890129178762436, -0.018567591905593872, 0.017671022564172745, 0.010415725409984589, -0.10982160270214081, -0.006633455399423838, -0.04896758124232292, -0.013660191558301449, 0.08561362326145172, -0.053375743329524994, -0.03323235362768173, -0.014611543156206608, -0.021257726475596428, -0.03287844732403755, -0.031741756945848465, -0.04042282700538635, -0.01076946035027504, 0.003489477327093482, 0.03310464322566986, 0.03136254847049713, -0.01674017682671547, -0.013121474534273148, -0.051032137125730515, -0.01155250146985054, -0.00022175462800078094, -0.029296178370714188, -0.011553495191037655, -0.004004312213510275, -0.026123305782675743 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
## Update user by ID Now we’ve created some users in our MongoDB collection, let’s try updating a user by `insertedId`: ``` mutation { mongo { userUpdate(by: { id: "65154a3d4ddec953105be188" }, input: { age: { set: 35 } }) { modifiedCount } } } ``` Using the `userUpdate` mutation above, we `set` a new `age` value for the user where the `id` matches that of the ObjectID we passed in. If everything was successful, you should see something like this: ```json { "data": { "mongo": { "userUpdate": { "modifiedCount": 1 } } } } ``` ## Delete user by ID
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.07056047767400742, 0.023055972531437874, 0.036091845482587814, -0.03555043786764145, 0.04239572584629059, -0.024462005123496056, 0.051553357392549515, 0.01875956542789936, -0.0033555980771780014, 0.014920142479240894, 0.016952769830822945, -0.045979905873537064, 0.02681058458983898, 0.03041687235236168, -0.045209649950265884, 0.01077018678188324, -0.04726526886224747, 0.020235756412148476, -0.06880785524845123, 0.051082927733659744, 0.035971395671367645, -0.019920507445931435, -0.03661947697401047, -0.056324880570173264, 0.03999125212430954, 0.08918222039937973, -0.0018162712221965194, 0.0017708559753373265, -0.056411322206258774, -0.21446532011032104, 0.014784533530473709, -0.03467237576842308, 0.02878163754940033, -0.04004296287894249, -0.016098951920866966, -0.03380502760410309, -0.009526371955871582, 0.05756395310163498, -0.0027922429144382477, 0.07843492925167084, 0.06778401881456375, -0.003606908954679966, -0.045942116528749466, -0.08585561811923981, -0.031900156289339066, -0.0003923587210010737, -0.03902379795908928, -0.011297234334051609, 0.018077298998832703, -0.009240550920367241, -0.017219500616192818, -0.05857783183455467, -0.026753002777695656, 0.04043801501393318, 0.036318931728601456, 0.048717763274908066, 0.06372532248497009, 0.02189226634800434, 0.00966014713048935, -0.005215941462665796, 0.03589987754821777, 0.03149544075131416, -0.15455743670463562, 0.09823688119649887, 0.05546357482671738, 0.0633816197514534, 0.007266305852681398, -0.07619761675596237, 0.033363763242959976, 0.028751639649271965, -0.03224761039018631, 0.020627552643418312, 0.04136015474796295, 0.01700744964182377, 0.023789439350366592, -0.019074365496635437, -0.014829130843281746, -0.058683451265096664, 0.03919773921370506, 0.047430459409952164, -0.05669644847512245, -0.07098881900310516, -0.01885961927473545, -0.015124955214560032, -0.022966720163822174, -0.05375465750694275, 0.04405606538057327, -0.07998882234096527, 0.01905731111764908, 0.04840848222374916, -0.006498098373413086, 0.03181755915284157, 0.03656095638871193, 0.04684208706021309, -0.08812098950147629, 0.04337165132164955, 0.005779630038887262, 0.045559439808130264, -0.06212301179766655, 0.20258934795856476, -0.01253692340105772, 0.018023516982793808, -0.026098482310771942, 0.006515903864055872, 0.023594316095113754, -0.0033678875770419836, -0.0325540155172348, -0.05310691148042679, 0.01680685579776764, 0.019272712990641594, -0.012605917640030384, 0.0039141541346907616, 0.030430451035499573, -0.00056365632917732, 0.008651930838823318, 0.04166235402226448, 0.028617478907108307, 0.06450307369232178, -0.019422320649027824, -0.00979336816817522, 0.025463348254561424, 0.036885470151901245, 0.025775142014026642, 0.0063326251693069935, 0.05160066485404968, -0.020384136587381363, 0.06780732423067093, 0.10880101472139359, -0.017137378454208374, 0.05419048294425011, 0.04230364412069321, 0.021006885915994644, -0.09319319576025009, -0.0006634080200456083, 0.01900879666209221, 0.018245864659547806, -0.033982791006565094, 0.029077613726258278, 0.011696034111082554, 0.008278905414044857, -0.03877195343375206, -0.10900196433067322, -0.04485899582505226, -0.10820075124502182, 0.006438028998672962, 0.11969921737909317, -0.0014361153589561582, 0.07226280868053436, -0.025983644649386406, -0.029610997065901756, -0.004853991325944662, 0.028912143781781197, -0.07865119725465775, -0.028091222047805786, -0.025761831551790237, 0.022241853177547455, 0.0606255903840065, 0.047256048768758774, -0.035782478749752045, 0.014166785404086113, -0.02537505328655243, 0.019456567242741585, -0.06722630560398102, 0.061266884207725525, 0.0032476172782480717, -0.09649856388568878, -0.03362823277711868, -0.018052848055958748, 0.025155184790492058, -0.014013441279530525, -0.013744250871241093, 0.038303032517433167, -0.07004915177822113, 0.015830934047698975, 0.10848663002252579, 0.03744613751769066, -0.03095698542892933, 0.010818829759955406, 0.004191327840089798, -0.001060444163158536, -0.028803396970033646, -0.019640250131487846, -0.04505544900894165, -0.005197141785174608, 0.006942649371922016, -0.06865555793046951, -0.0010350702796131372, -0.018387284129858017, 0.08545038104057312, 0.053038038313388824, -0.010481605306267738, 0.020516691729426384, -0.012236897833645344, -0.018283212557435036, -0.0529683493077755, -0.0556633435189724, -0.043306589126586914, -0.03738920018076897, 0.005243957508355379, -0.02410898171365261, 0.03454604744911194, 0.044495150446891785, -0.012166209518909454, 0.005069931037724018, -0.02839987352490425, 0.03265957534313202, -0.030238410457968712, -0.0510789230465889, 0.05076226592063904, 0.003369383979588747, -0.02058558724820614, 0.013911992311477661, 0.0040032402612268925, -0.008709556423127651, -0.04384687915444374, -0.005729286465793848, -0.007088928017765284, 0.009520569816231728, 0.06392686814069748, 0.0163126178085804, 0.019948620349168777, -0.020596645772457123, 0.015131734311580658, -0.2575571835041046, 0.015319924801588058, -0.010755532421171665, -0.004570025019347668, -0.004283553455024958, -0.04655296355485916, 0.018253063783049583, -0.02107713744044304, -0.014155256561934948, 0.05016675591468811, 0.007121709641069174, -0.02246072329580784, 0.033397264778614044, 0.03174513578414917, 0.003055320121347904, 0.053026821464300156, 0.013204999268054962, -0.023797115311026573, -0.005387079901993275, -0.03962349519133568, -0.029342371970415115, 0.01758386380970478, -0.00545641640201211, -0.08828259259462357, 0.029550975188612938, -0.008103370666503906, 0.20950046181678772, 0.044524963945150375, -0.0101160304620862, -0.03595110401511192, 0.0644412711262703, -0.0012345678405836225, -0.01903666742146015, -0.0849696472287178, 0.022816868498921394, 0.032987792044878006, -0.0017316765151917934, -0.016925768926739693, 0.0014014311600476503, -0.0653688907623291, 0.0011650368105620146, 0.0027553467079997063, 0.03370625153183937, -0.08912977576255798, -0.017801176756620407, -0.03979276865720749, -0.0412154495716095, 0.005113874562084675, -0.04575552046298981, 0.021338440477848053, 0.053096216171979904, 0.03895171731710434, 0.06830838322639465, 0.021587621420621872, -0.04045768082141876, -0.047458063811063766, -0.06044881045818329, 0.032692234963178635, -0.016357792541384697, 0.0732530951499939, -0.024913350120186806, -0.017634768038988113, 0.012528140097856522, -0.03744472190737724, 0.0645885095000267, -0.01978304237127304, 0.009566270746290684, -0.031342409551143646, 0.025065870955586433, -0.08331254124641418, -0.01154043897986412, 0.06977304816246033, -0.02373948134481907, 0.018785035237669945, 0.02122538350522518, 0.04829726740717888, -0.03785581886768341, -0.02519175224006176, -0.04016268998384476, -0.0037584786769002676, 0.019850239157676697, -0.029613815248012543, 0.025760766118764877, 0.0651865005493164, 0.023813407868146896, 0.005201320163905621, 0.03220422938466072, 0.012475327588617802, 0.009808727540075779, -0.05068965628743172, -0.020162630826234818, -0.018815908581018448, -0.059417761862277985, -0.07790692150592804, -0.021410835906863213, -0.010996893048286438, -0.2682086229324341, 0.029852360486984253, -0.017742440104484558, 0.019533859565854073, 0.028194237500429153, 0.05933193489909172, 0.031071610748767853, 0.0353512316942215, -0.03228814899921417, 0.010277328081429005, -0.0023890146985650063, -0.004127365071326494, 0.005243104416877031, 0.03861340135335922, 0.010983713902533054, 0.04879358783364296, -0.023685405030846596, -0.08130767196416855, 0.062143005430698395, -0.06203606724739075, 0.059369366616010666, 0.07101447880268097, 0.23822365701198578, 0.035616543143987656, 0.05592283979058266, 0.06502639502286911, 0.051322080194950104, 0.09378168731927872, 0.08951558917760849, -0.01774413324892521, -0.031058907508850098, 0.04847165569663048, 0.06843516230583191, -0.02207871899008751, 0.06280262023210526, 0.036272864788770676, -0.06332235038280487, 0.003670550649985671, 0.02219255454838276, -0.026707176119089127, -0.0847146287560463, 0.010545410215854645, -0.014721629209816456, -0.002224339870736003, 0.13627290725708008, -0.0671277716755867, -0.05966498330235481, -0.031526386737823486, 0.004626918118447065, -0.023111874237656593, -0.028702354058623314, -0.04494738578796387, -0.004954745527356863, -0.004754760768264532, 0.03804894536733627, 0.015333286486566067, -0.03478877246379852, -0.008693247102200985, -0.03621506318449974, -0.01982663758099079, 0.008924318477511406, -0.007173407822847366, -0.03388193994760513, 0.00486494367942214, -0.029880113899707794 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
## Delete user by ID Deleting users is similar to the create and update mutations above, but we don’t need to provide any additional `input` data since we’re deleting only: ``` mutation { mongo { userDelete(by: { id: "65154a3d4ddec953105be188" }) { deletedCount } } } ``` If everything was successful, you should see something like this: ```json { "data": { "mongo": { "userDelete": { "deletedCount": 1 } } } } ``` ## Fetch all users Grafbase generates the query `userCollection` that you can use to fetch all users. Grafbase requires a `first` or `last` pagination value with a max value of `100`:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.05340757966041565, 0.022377613931894302, 0.027686472982168198, -0.02726184017956257, 0.047844938933849335, -0.02716010808944702, 0.04417137801647186, 0.04182431846857071, -0.015378356911242008, 0.019935769960284233, 0.013906395994126797, -0.051592398434877396, 0.047898877412080765, 0.035340383648872375, -0.03046814724802971, 0.011831899173557758, -0.04147226735949516, 0.008972374722361565, -0.060253292322158813, 0.04009062424302101, 0.04820552095770836, -0.03551562875509262, -0.038842007517814636, -0.06352554261684418, 0.0346246138215065, 0.054756224155426025, -0.014346599578857422, -0.027377210557460785, -0.05668017268180847, -0.22093862295150757, 0.005560572259128094, -0.02094372548162937, 0.06960400193929672, -0.050588201731443405, 0.0011064239079132676, -0.042447298765182495, -0.017154302448034286, 0.0545508898794651, -0.01802288182079792, 0.09798897057771683, 0.07551770657300949, -0.009744523093104362, -0.016245190054178238, -0.06358756124973297, -0.01614258997142315, -0.0093696815893054, -0.03369089215993881, -0.03205203637480736, 0.027500180527567863, -0.022529659792780876, -0.01555639784783125, -0.05848260223865509, -0.017494695261120796, 0.0652233138680458, 0.05470458045601845, 0.03133107349276543, 0.07072858512401581, 0.02218851074576378, 0.01686794124543667, 0.012004267424345016, 0.03477931395173073, 0.021931899711489677, -0.1534496247768402, 0.05469702184200287, 0.04379412159323692, 0.0720517560839653, -0.006092803552746773, -0.07791271060705185, 0.043662723153829575, 0.02672223001718521, -0.02673032321035862, 0.03682808205485344, 0.027386974543333054, 0.033051639795303345, 0.01452129427343607, 0.0016154455952346325, -0.03398765251040459, -0.04356865957379341, 0.005240539088845253, 0.026200037449598312, -0.04980819299817085, -0.08551479876041412, -0.02027924545109272, -0.009106297045946121, -0.028732849285006523, -0.06762635707855225, 0.02419540472328663, -0.05522932484745979, -0.0019527088152244687, 0.03929244726896286, 0.014688280411064625, 0.023798512294888496, 0.038294244557619095, 0.05986809358000755, -0.11138200759887695, 0.03707629069685936, 0.009248489513993263, 0.05479198321700096, -0.03534413129091263, 0.23594798147678375, -0.0028215935453772545, 0.03372643515467644, -0.01459873840212822, -0.010609772987663746, 0.019854987040162086, 0.00493827136233449, -0.01880127377808094, -0.045777201652526855, 0.01779661700129509, 0.03036562167108059, -0.0009160711197182536, -0.021265214309096336, 0.04916531220078468, -0.027772486209869385, 0.02270079031586647, 0.015392011031508446, 0.03771383687853813, 0.05946609750390053, -0.02092006430029869, -0.00507823470979929, -0.01839737966656685, 0.03436905890703201, 0.03299342095851898, 0.009882952086627483, 0.06618061661720276, 0.00484824413433671, 0.0392853282392025, 0.12061326205730438, 0.0025146338157355785, 0.03471861407160759, 0.027609724551439285, 0.0036992293316870928, -0.0734747052192688, 0.0002839028020389378, -0.003787748282775283, -0.008630759082734585, -0.02364283800125122, 0.008549612946808338, -0.009727361612021923, 0.012644883245229721, -0.05108143761754036, -0.08869946748018265, -0.03208046406507492, -0.09463976323604584, -0.00931607000529766, 0.09217730164527893, 0.008878136985003948, 0.03743787109851837, -0.049814753234386444, -0.00824655406177044, -0.0023341120686382055, 0.058606140315532684, -0.051777906715869904, -0.04219506308436394, -0.01777348481118679, 0.05153999105095863, 0.05330200120806694, 0.06394272297620773, -0.03881462663412094, 0.02255331724882126, -0.03388774394989014, -0.007755283731967211, -0.05072607472538948, 0.08598507940769196, 0.013344080187380314, -0.08154018223285675, -0.0448138564825058, 0.01317426934838295, 0.0009513659169897437, 0.0032188049517571926, -0.016942903399467468, -0.019839804619550705, -0.08807582408189774, 0.004562512505799532, 0.10771867632865906, 0.023542942479252815, -0.06147637963294983, 0.012164467945694923, -0.020581385120749474, 0.018575118854641914, -0.03771895915269852, -0.024243153631687164, -0.035240739583969116, 0.0019875613506883383, 0.003958188928663731, -0.047000110149383545, 0.02966529130935669, -0.01055891066789627, 0.08825186640024185, 0.058442145586013794, -0.035559993237257004, 0.017464756965637207, -0.016660073772072792, -0.034808218479156494, -0.07279261946678162, -0.0633658841252327, -0.029487181454896927, -0.012039023451507092, 0.022161614149808884, -0.033906519412994385, 0.057739391922950745, 0.027539439499378204, -0.022117113694548607, 0.011274346150457859, -0.01307547278702259, 0.06117324158549309, -0.02409243956208229, -0.04269445687532425, 0.04667068272829056, 0.024415621533989906, -0.008002490736544132, 0.0137947341427207, 0.005544703453779221, -0.011234577745199203, -0.026310238987207413, -0.05402614548802376, -0.000033999778679572046, 0.007873021066188812, 0.05207832530140877, 0.036656755954027176, 0.010946319438517094, -0.009827380068600178, -0.016705384477972984, -0.26286935806274414, 0.006229082588106394, -0.026312753558158875, -0.006804382428526878, 0.012242094613611698, -0.05760468915104866, 0.008657571859657764, -0.053312841802835464, 0.007921230047941208, 0.0646989494562149, 0.02107091061770916, 0.013463504612445831, -0.01604820042848587, 0.045858513563871384, 0.014567462727427483, 0.05240637809038162, 0.020534468814730644, 0.007599805016070604, -0.03913822025060654, -0.05654120072722435, -0.015789104625582695, 0.01861484721302986, 0.029777541756629944, -0.10196121037006378, 0.011693298816680908, 0.012338962405920029, 0.21597053110599518, 0.05919085443019867, 0.0055078561417758465, -0.022583240643143654, 0.07124046981334686, -0.009254666976630688, -0.03667263314127922, -0.08116480708122253, 0.033731453120708466, 0.03841431438922882, 0.007349326740950346, -0.03273274749517441, 0.04072634503245354, -0.04907718300819397, 0.002442349214106798, -0.018950030207633972, 0.009000386111438274, -0.0771234780550003, -0.027165813371539116, -0.017542308196425438, -0.05340536683797836, 0.028858263045549393, -0.049305859953165054, 0.051387134939432144, 0.053366802632808685, 0.024443771690130234, 0.0780426487326622, 0.02559739537537098, -0.015320688486099243, -0.04911472648382187, -0.06776684522628784, 0.024506395682692528, -0.048818375915288925, 0.06969484686851501, -0.006275811232626438, -0.030046580359339714, 0.00637537008151412, -0.06518422812223434, 0.02279939316213131, -0.022414430975914, -0.01343198586255312, -0.005404168274253607, 0.02470318228006363, -0.07585711777210236, 0.0005292180576361716, 0.06069926172494888, -0.027208279818296432, 0.03776414319872856, -0.006059151142835617, 0.03828922659158707, -0.013363020494580269, -0.03986683115363121, -0.05458052456378937, -0.04060053452849388, 0.021015575155615807, -0.034055158495903015, 0.027887012809515, 0.05822290852665901, 0.021392209455370903, 0.023501979187130928, 0.03674304485321045, 0.0006291736499406397, 0.031637031584978104, -0.02987985871732235, -0.024464815855026245, -0.01366702001541853, -0.07464442402124405, -0.07911345362663269, -0.02072792500257492, -0.0023849180433899164, -0.2663726210594177, 0.030398299917578697, 0.0013646235456690192, 0.04479312151670456, 0.025312528014183044, 0.062301915138959885, 0.03897003456950188, 0.03305075690150261, 0.01612131856381893, -0.0012346820440143347, 0.024333322420716286, 0.008086683228611946, 0.04011247679591179, 0.011633290909230709, 0.015368579886853695, 0.03859708458185196, 0.009456666186451912, -0.08569496124982834, 0.05236784741282463, -0.0613672137260437, 0.04371841624379158, 0.01611068844795227, 0.22260650992393494, 0.022749241441488266, 0.03878925368189812, 0.06814651936292648, 0.0341603122651577, 0.05663696676492691, 0.048946019262075424, -0.01300977822393179, -0.034597259014844894, 0.031107990071177483, 0.05391593277454376, -0.041871704161167145, 0.03745798394083977, 0.06898816674947739, -0.04256491735577583, -0.011172269470989704, 0.018625764176249504, -0.0474017858505249, -0.09280157834291458, 0.004170101135969162, -0.010007386095821857, -0.01643572375178337, 0.14212121069431305, -0.0789438784122467, -0.04166959226131439, -0.047920841723680496, 0.021757811307907104, 0.017643922939896584, -0.035671819001436234, -0.05131286010146141, -0.017110319808125496, -0.021243611350655556, 0.030592413619160652, 0.03836071491241455, -0.03116977959871292, -0.009965422563254833, -0.010494806803762913, -0.006247164681553841, 0.020876549184322357, 0.01100678090006113, -0.03332265466451645, 0.008545171469449997, -0.011726683005690575 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
``` query { mongo { userCollection(first: 100) { edges { node { id name email age } } } } } ``` Here we are fetching the `first` 100 users from the collection. You can also pass a filter and order argument to tune the results: ``` query { mongo { userCollection(first: 100, filter: { age: { gt: 30 } }, orderBy: { age: ASC }) { edges { node { id name email age } } } } } ``` ## Fetch user by ID Using the same GraphQL API, we can fetch a user by the object ID. Grafbase automatically generates the query `user` where we can pass the `id` to the `by` input type:
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.043748993426561356, 0.030563896521925926, -0.003987419418990612, -0.01940014772117138, 0.01786317117512226, -0.005038009956479073, 0.028533639386296272, 0.025421829894185066, -0.008042658679187298, 0.01552485954016447, -0.004550616722553968, -0.04388279467821121, 0.049167294055223465, 0.03163282573223114, -0.032693177461624146, 0.055880531668663025, -0.020412174984812737, 0.018008816987276077, -0.05512841045856476, 0.010892760008573532, 0.04467720165848732, -0.0020794374868273735, -0.053736183792352676, -0.06891556084156036, 0.03383046016097069, 0.06345129758119583, -0.013122878968715668, -0.038078825920820236, -0.03014875389635563, -0.1995970755815506, -0.0028524359222501516, -0.041482310742139816, 0.047239042818546295, -0.06240713596343994, -0.003720849519595504, -0.04755355045199394, 0.020343294367194176, 0.057621318846940994, -0.0289918202906847, 0.06617752462625504, 0.0754980519413948, -0.029162131249904633, -0.025535831227898598, -0.056294698268175125, -0.02584780566394329, 0.00007202267443062738, -0.019979046657681465, -0.01910145953297615, -0.00952580664306879, -0.046074070036411285, -0.03615143895149231, -0.020822683349251747, 0.02143668755888939, 0.03907609358429909, 0.024665217846632004, 0.06281162798404694, 0.02282620221376419, -0.0066179088316857815, 0.03354649245738983, 0.03281346708536148, 0.011307891458272934, -0.017695562914013863, -0.15150399506092072, 0.07971944659948349, 0.015755442902445793, 0.050411973148584366, -0.02320471592247486, -0.033560603857040405, -0.01247474830597639, 0.04170627519488335, 0.005931683350354433, 0.028893351554870605, 0.0174377653747797, 0.02585792914032936, 0.023524083197116852, -0.025160321965813637, -0.040312908589839935, -0.029835665598511696, 0.019650159403681755, 0.020083893090486526, -0.06744685769081116, -0.05186047405004501, -0.028542164713144302, 0.01678369753062725, -0.003168243682011962, -0.04014904797077179, 0.02142292633652687, -0.06596551090478897, 0.06044093891978264, 0.052472349256277084, -0.007376049179583788, -0.00665829936042428, -0.017476795241236687, 0.06300467997789383, -0.0581132210791111, 0.003937151748687029, 0.021143773570656776, 0.031806107610464096, -0.007175235077738762, 0.23850420117378235, 0.026136934757232666, 0.05648884177207947, 0.002876646351069212, 0.0038504558615386486, -0.005177670158445835, -0.03478813171386719, -0.016724206507205963, -0.06920300424098969, -0.0014579987619072199, 0.027782738208770752, -0.045686058700084686, -0.04863359034061432, 0.03132199868559837, -0.05066835135221481, 0.016614217311143875, 0.019619258120656013, 0.04345069080591202, 0.05719246715307236, -0.004112529568374157, -0.022216852754354477, -0.0022121709771454334, 0.0580572709441185, 0.03266473487019539, 0.029185520485043526, 0.05570686236023903, -0.029324769973754883, 0.051869723945856094, 0.10773230344057083, 0.017724283039569855, 0.0606922022998333, 0.0367068313062191, -0.008108016103506088, -0.07110907137393951, -0.011648966930806637, -0.006128957960754633, -0.002508076373487711, 0.004488472826778889, 0.018605362623929977, -0.01890718750655651, 0.033326759934425354, -0.01572720892727375, -0.06579998135566711, -0.04631077125668526, -0.0823817104101181, -0.022398291155695915, 0.09766489267349243, -0.011695207096636295, 0.04176437109708786, -0.0923752635717392, -0.041493408381938934, -0.013665451668202877, 0.044944409281015396, -0.06768978387117386, -0.040399130433797836, -0.019141091033816338, 0.038107890635728836, 0.051408033818006516, 0.09321167320013046, -0.023783059790730476, -0.008463443256914616, -0.03439776599407196, -0.009417694993317127, -0.0563342459499836, 0.07975639402866364, 0.02023995853960514, -0.11227450519800186, -0.008799496106803417, 0.030728915706276894, -0.023306366056203842, -0.010594588704407215, 0.02981829270720482, 0.00486492644995451, -0.10205137729644775, 0.021135922521352768, 0.10136507451534271, 0.037348970770835876, -0.07231109589338303, -0.031701765954494476, -0.031395796686410904, 0.03372253105044365, -0.017807312309741974, -0.011552453972399235, -0.041745852679014206, 0.004903411492705345, 0.012765337713062763, -0.051145657896995544, -0.0032124880235642195, -0.0023899648804217577, 0.06504035741090775, 0.0312026496976614, -0.01226230151951313, 0.03626184165477753, -0.027295254170894623, 0.020787810906767845, -0.050394125282764435, -0.05158965662121773, -0.04170839115977287, -0.004366948734968901, 0.0017594454111531377, -0.022564705461263657, 0.07868952304124832, 0.0022686708252876997, -0.021589167416095734, 0.05276760086417198, -0.009429287165403366, 0.019729508087038994, -0.03766028210520744, -0.023283014073967934, 0.03988035395741463, -0.004222053103148937, -0.015934379771351814, -0.02201073057949543, 0.0332886166870594, 0.0289017166942358, -0.02828359603881836, -0.022359423339366913, 0.01896042376756668, 0.014255673624575138, 0.05249723792076111, 0.025716416537761688, 0.0012437207624316216, -0.04460190609097481, -0.010799740441143513, -0.28109779953956604, 0.0226175207644701, -0.0004256991669535637, 0.004668094217777252, 0.025527851656079292, -0.04893241450190544, -0.0007213170174509287, -0.022146325558423996, 0.00047638750402256846, 0.09617914259433746, 0.06662803888320923, 0.01748100109398365, -0.011488156393170357, 0.0514216348528862, -0.025286581367254257, 0.083498015999794, 0.025263991206884384, 0.023101668804883957, -0.022077742964029312, -0.04673530161380768, 0.02191026508808136, 0.005013785790652037, -0.010598292574286461, -0.1015527993440628, 0.016846725717186928, 0.014794220216572285, 0.23015892505645752, 0.0602535679936409, -0.06101614236831665, -0.04259666055440903, 0.05372896417975426, -0.0303189679980278, -0.03727971389889717, -0.07719430327415466, 0.04333942383527756, 0.04139920324087143, 0.002605756977573037, -0.03262045606970787, 0.014587793499231339, -0.022478235885500908, -0.026804743334650993, 0.027442971244454384, 0.017485324293375015, -0.06494803726673126, -0.02625548094511032, -0.025312088429927826, -0.04925628378987312, 0.024945415556430817, -0.022388076409697533, 0.0020522119011729956, 0.006446603685617447, -0.0001574224588694051, 0.056679945439100266, 0.04211311787366867, -0.010580354370176792, -0.05841883644461632, -0.07101266086101532, 0.0022030393593013287, -0.02967495657503605, 0.04942161589860916, 0.0007483643712475896, -0.03919411450624466, -0.0026308055967092514, -0.052271127700805664, 0.007187629584223032, -0.0016668752068653703, -0.012476530857384205, -0.02211538515985012, -0.0007679075933992863, -0.06139061599969864, 0.02401687204837799, 0.04997601360082626, -0.02898257225751877, 0.058397602289915085, 0.028444014489650726, 0.06329421699047089, 0.03147059679031372, -0.00682489201426506, -0.026534348726272583, -0.04367898032069206, 0.014741223305463791, -0.06146674230694771, 0.05655846372246742, 0.014046253636479378, 0.04800453037023544, 0.004177782218903303, 0.051654014736413956, 0.007236714009195566, 0.012424943037331104, -0.0162852481007576, -0.009181947447359562, 0.0076212030835449696, -0.09826846420764923, -0.07327032089233398, -0.022603897377848625, -0.03626029193401337, -0.29386287927627563, 0.052794478833675385, -0.0056774914264678955, 0.052342209964990616, 0.018948586657643318, 0.04283326864242554, 0.07053865492343903, 0.010079189203679562, -0.009903239086270332, -0.005138815380632877, 0.05043456330895424, 0.0646810531616211, 0.02502080425620079, 0.023781299591064453, -0.017551330849528313, 0.0503225140273571, -0.023027583956718445, -0.05926794931292534, 0.03642518073320389, -0.04366631805896759, 0.0707959234714508, 0.06645609438419342, 0.2129836529493332, 0.030046239495277405, 0.03219452500343323, 0.0686798021197319, 0.008751706220209599, -0.006273665465414524, 0.03959200903773308, 0.003886190243065357, -0.00176344346255064, 0.015221734531223774, 0.0996885597705841, -0.01924581453204155, 0.06396955251693726, 0.08948672562837601, -0.016002021729946136, 0.015125148929655552, 0.007773288991302252, -0.04300115630030632, -0.09857962280511856, -0.006663007196038961, -0.01117687951773405, -0.016647618263959885, 0.09835632145404816, -0.06460903584957123, -0.015274086967110634, -0.05741874501109123, 0.007590319495648146, 0.0070947338826954365, -0.05862158164381981, -0.038114722818136215, 0.017908364534378052, -0.009759100154042244, 0.035340942442417145, 0.022274523973464966, -0.02509545162320137, -0.009012567810714245, -0.03645741567015648, -0.020664051175117493, -0.005644163582473993, -0.05110199376940727, -0.02527659386396408, 0.008895988576114178, 0.002316773170605302 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
``` query { mongo { user( by: { id: "64ee1cfbb315482287acea78" } ) { id name email age } } } ``` ## Enable faster responses with GraphQL Edge Caching Every request we make so far to our GraphQL API makes a round trip to the MongoDB database. This is fine, but we can improve response times even further by enabling GraphQL Edge Caching for GraphQL queries. To enable GraphQL Edge Caching, inside `grafbase/grafbase.config.ts`, add the following to the `config` export: ```ts export default config({ schema: g, cache: { rules: { types: 'Query', maxAge: 60 } ] } }) ```
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.04972122609615326, 0.02118612453341484, 0.00963200069963932, 0.0016703347209841013, 0.029073672369122505, -0.023298271000385284, 0.011379036121070385, 0.029985908418893814, -0.018492111936211586, -0.009112842381000519, -0.00013112025044392794, -0.04699208214879036, 0.04552290216088295, 0.04094374552369118, 0.00550819281488657, 0.056012410670518875, -0.017353884875774384, 0.012435873039066792, -0.06236738711595535, -0.006651563569903374, 0.0407390370965004, -0.022694706916809082, -0.03571926802396774, -0.03990308567881584, 0.010035437531769276, 0.03979858011007309, -0.0006758819217793643, -0.031127875670790672, -0.04564952850341797, -0.22654232382774353, 0.00794973038136959, -0.052191540598869324, 0.011748778633773327, -0.04715287312865257, -0.01949537731707096, -0.046692539006471634, 0.02416982501745224, 0.0456576831638813, -0.038621656596660614, 0.07235556840896606, 0.05533336475491524, 0.009912586770951748, -0.03808470442891121, -0.03517980873584747, -0.021310919895768166, -0.01796450838446617, -0.02476479299366474, -0.01398323941975832, 0.0011201049201190472, -0.04505695775151253, -0.0017145037418231368, -0.03648235276341438, 0.0011934868525713682, 0.022468967363238335, 0.04365921393036842, 0.07568492740392685, 0.037355173379182816, -0.001478790887631476, 0.02961461991071701, -0.01681016944348812, 0.027132412418723106, 0.011553908698260784, -0.14051730930805206, 0.08364216238260269, 0.029253922402858734, 0.05190712586045265, -0.041613154113292694, -0.026909183710813522, -0.016669249162077904, 0.02512759156525135, -0.02919154055416584, 0.043685123324394226, 0.03411358594894409, 0.03837154060602188, 0.010708599351346493, 0.006078588310629129, -0.03317849338054657, -0.054803572595119476, 0.03141636773943901, 0.004763118457049131, -0.054080937057733536, -0.060411520302295685, -0.03632821515202522, 0.0037972619757056236, -0.004318821243941784, -0.07295859605073929, 0.008327736519277096, -0.06787063181400299, 0.04815774783492088, 0.04442824423313141, 0.011393975466489792, -0.021728722378611565, 0.006910288240760565, 0.06983350217342377, -0.10651019960641861, 0.024158470332622528, 0.03280872106552124, 0.043534863740205765, -0.04165930300951004, 0.23711717128753662, 0.01315546315163374, 0.04379133880138397, 0.0022741183638572693, -0.01257405150681734, 0.023877611383795738, -0.05017092078924179, 0.0019663823768496513, -0.02721414342522621, 0.013064712285995483, 0.021185440942645073, -0.04160313308238983, -0.027114879339933395, 0.018938522785902023, -0.06800203770399094, -0.021003568544983864, 0.028082692995667458, 0.025815248489379883, 0.05689380317926407, -0.0315655879676342, -0.014076280407607555, -0.0032960663083940744, 0.05673305317759514, 0.024917419999837875, 0.013872921466827393, 0.0668138861656189, -0.00705380504950881, 0.044648196548223495, 0.052127640694379807, 0.020829202607274055, 0.04513966292142868, 0.02348734624683857, -0.014253528788685799, -0.024068767204880714, -0.0021234352607280016, -0.027699274942278862, -0.02662734128534794, 0.0043741920962929726, 0.011919797398149967, 0.021004987880587578, 0.03332756087183952, -0.016076592728495598, -0.05632955953478813, -0.024715112522244453, -0.06573917716741562, -0.01396423764526844, 0.10138362646102905, -0.002425176789984107, 0.04708156734704971, -0.09055282920598984, -0.058213431388139725, -0.013784862123429775, 0.0628526583313942, -0.03664139658212662, -0.027139462530612946, -0.021386349573731422, 0.03003832697868347, 0.01432813610881567, 0.07691575586795807, -0.02742442674934864, -0.028005586937069893, -0.013591437600553036, 0.011143524199724197, -0.04084939509630203, 0.08071191608905792, 0.029821155592799187, -0.11080631613731384, 0.0032296329736709595, 0.03132040053606033, -0.014748979359865189, -0.009850765578448772, 0.003696108004078269, 0.0018186542438343167, -0.11215639859437943, 0.01264531072229147, 0.12310384958982468, -0.007479540538042784, -0.07025077939033508, -0.03233839198946953, -0.03563401848077774, 0.01040002889931202, 0.007944157347083092, 0.01015778910368681, -0.04019615054130554, -0.0045281886123120785, 0.04372235760092735, -0.03563295304775238, -0.0017047161236405373, -0.0019282326102256775, 0.08314685523509979, 0.0012924993643537164, -0.033452074974775314, 0.03337373211979866, -0.029520150274038315, 0.024207836017012596, -0.03363731876015663, -0.05584144592285156, -0.02655004896223545, 0.0002710272092372179, 0.019689252600073814, -0.027463894337415695, 0.10493389517068863, -0.005450467579066753, -0.00849168561398983, 0.03471574932336807, -0.017642220482230186, 0.016314717009663582, -0.035734500735998154, -0.019723009318113327, 0.0691351518034935, 0.02546110190451145, -0.021262314170598984, -0.014025542885065079, 0.0205059926956892, 0.006578603759407997, -0.011314056813716888, -0.007873882539570332, 0.030057387426495552, -0.009213842451572418, 0.03647491708397865, 0.04122074320912361, 0.019042659550905228, -0.024228623136878014, -0.06171377748250961, -0.2777080833911896, 0.020364010706543922, -0.043012719601392746, 0.004572802223265171, 0.06127803772687912, -0.07576613128185272, -0.0018722213571891189, 0.004733211826533079, 0.017631884664297104, 0.08786281198263168, 0.038818251341581345, 0.02662993036210537, -0.018813423812389374, 0.045297592878341675, -0.02603308856487274, 0.05175128951668739, 0.0247004684060812, 0.023698126897215843, -0.019974999129772186, -0.023722300305962563, 0.016254132613539696, 0.008064636029303074, -0.016918202862143517, -0.09197080135345459, 0.007861649617552757, 0.019814113155007362, 0.2260851413011551, 0.023691199719905853, -0.04450022056698799, -0.05842496454715729, 0.052431199699640274, -0.013987312093377113, 0.004253115970641375, -0.14064575731754303, 0.058326464146375656, 0.0125419395044446, 0.01733204908668995, 0.013447540812194347, 0.00524155655875802, -0.028224928304553032, -0.030758969485759735, 0.025094816461205482, 0.018271014094352722, -0.07634586840867996, -0.022223474457859993, -0.015529310330748558, -0.05367441847920418, 0.011325563304126263, -0.05611242726445198, -0.008887949399650097, 0.005538102705031633, 0.018971018493175507, 0.054790254682302475, 0.04474222660064697, -0.011110633611679077, -0.05246872454881668, -0.07302360981702805, 0.012294943444430828, -0.044265516102313995, 0.026036515831947327, -0.00012293686449993402, -0.03557555377483368, 0.021389523521065712, -0.041880108416080475, 0.016221461817622185, 0.009747141972184181, -0.01404156070202589, -0.02478630654513836, -0.006914776284247637, -0.057644594460725784, -0.0043358951807022095, 0.05743449181318283, -0.03925121948122978, 0.048874977976083755, 0.02796655148267746, 0.05516644939780235, 0.026224898174405098, 0.006680902559310198, -0.016059663146734238, -0.06984554976224899, 0.06326895952224731, -0.07012881338596344, 0.07467343658208847, 0.01096980832517147, 0.049771081656217575, 0.018144598230719566, 0.050841324031353, 0.0015846379101276398, 0.03211692348122597, 0.010203900747001171, -0.012205484323203564, -0.029824789613485336, -0.055096086114645004, -0.09268229454755783, -0.006079988554120064, -0.03073584847152233, -0.30192169547080994, 0.050930384546518326, 0.03506188094615936, 0.00870463065803051, -0.005024330224841833, 0.0704001635313034, 0.04768023639917374, 0.032171715050935745, -0.02154098078608513, 0.01101293321698904, 0.010706719942390919, 0.07993236929178238, 0.03856312111020088, 0.024974636733531952, 0.010712162591516972, 0.05947629734873772, -0.013034671545028687, -0.05849722400307655, 0.06675764173269272, -0.045592401176691055, 0.05415678769350052, 0.040827058255672455, 0.23535281419754028, 0.03329551964998245, 0.019629601389169693, 0.08444765210151672, 0.019428743049502373, -0.02948945015668869, 0.054115377366542816, -0.0074072303250432014, 0.01131840143352747, 0.008554273284971714, 0.07402429729700089, -0.009704138152301311, 0.04408911243081093, 0.07561742514371872, -0.024663370102643967, 0.015306293033063412, -0.0003109961689915508, -0.01796821318566799, -0.06062162667512894, 0.008924893103539944, -0.019465258345007896, 0.018700798973441124, 0.05365040898323059, -0.08409297466278076, -0.030346399173140526, -0.05690683051943779, 0.030272340402007103, -0.02055767923593521, -0.04460175335407257, -0.047894351184368134, 0.016894586384296417, 0.016855748370289803, 0.02868492901325226, 0.025146717205643654, 0.008624495007097721, -0.022441277280449867, -0.018760988488793373, -0.024260014295578003, 0.015166274271905422, -0.040570590645074844, -0.028972774744033813, -0.0033371460158377886, -0.007437474559992552 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
This configuration will cache any query. If you only want to disable caching on some collections, you can do that too. [Learn more about GraphQL Edge Caching. ## Deploy to the edge So far, we’ve been working with Grafbase locally using the CLI, but now it’s time to deploy this around the world to the edge with GitHub. If you already have an existing GitHub repository, go ahead and commit the changes we’ve made so far. If you don’t already have a GitHub repository, you will need to create one, commit this code, and push it to GitHub. Now, create a new project with Grafbase and connect your GitHub account. You’ll need to permit Grafbase to read your repository contents, so make sure you select the correct repository and allow that.
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.02148193120956421, -0.010524870827794075, 0.0006254873587749898, 0.02242985926568508, -0.0030463174916803837, -0.030734268948435783, 0.016447149217128754, 0.00230612326413393, -0.013110250234603882, -0.013083008117973804, 0.010736558586359024, -0.020929548889398575, 0.0785050094127655, 0.03869276121258736, 0.017762985080480576, 0.03663960471749306, -0.04330509155988693, 0.028661400079727173, -0.03352659195661545, -0.025980144739151, 0.04130053520202637, -0.029769254848361015, -0.013331171125173569, -0.03951195254921913, -0.0006184029625728726, 0.044539082795381546, -0.0038719221483916044, -0.05973698943853378, -0.045681897550821304, -0.22005228698253632, -0.02528805285692215, -0.06378959119319916, 0.010777839459478855, -0.019471503794193268, 0.03283687308430672, -0.0412849523127079, 0.017026223242282867, 0.03652162849903107, -0.06303997337818146, 0.08814714103937149, 0.05312861502170563, 0.016839226707816124, -0.05942940339446068, -0.035993482917547226, -0.028582394123077393, -0.03132283687591553, -0.029176905751228333, -0.033446069806814194, 0.061754897236824036, -0.02831350453197956, 0.018518244847655296, -0.02497609704732895, -0.0005874363705515862, 0.018798768520355225, 0.013290978968143463, 0.06464030593633652, 0.0678669810295105, 0.016907695680856705, 0.019808392971754074, -0.008616265840828419, 0.04163258150219917, 0.0358092226088047, -0.1455230712890625, 0.08737123757600784, 0.025369377806782722, 0.010577778331935406, -0.030038543045520782, -0.03606247901916504, 0.04616139829158783, 0.06348048150539398, -0.029940735548734665, 0.04635189473628998, -0.003283982863649726, 0.05700840428471565, 0.044904615730047226, -0.007341029122471809, -0.03237900882959366, -0.012083794921636581, 0.013226653449237347, -0.00863907765597105, -0.04440329968929291, -0.059328868985176086, -0.0031581902876496315, 0.023684021085500717, -0.041130706667900085, -0.06830798834562302, 0.0007624418940395117, -0.05881870910525322, 0.04528205469250679, 0.023897331207990646, -0.019517503678798676, -0.044790029525756836, 0.02504085563123226, 0.03261106461286545, -0.09724976122379303, -0.009731443598866463, 0.034953922033309937, 0.03203009068965912, -0.03488032519817352, 0.2558412253856659, -0.008966878987848759, 0.02071208320558071, 0.013678191229701042, 0.005714827217161655, 0.03696659207344055, -0.03974292427301407, -0.0011447567958384752, -0.019882600754499435, 0.0016677211970090866, 0.037925105541944504, -0.017159506678581238, -0.02939726784825325, 0.014801673591136932, -0.06367924809455872, -0.011016159318387508, 0.01386465597897768, 0.04622532054781914, 0.06832100450992584, -0.03458555042743683, -0.006565616931766272, -0.035322561860084534, 0.03915253281593323, 0.030902566388249397, 0.00844189990311861, 0.06529230624437332, -0.03297799080610275, 0.028470247983932495, 0.03916432335972786, 0.034876830875873566, 0.0253007635474205, 0.01113453134894371, -0.017567193135619164, -0.0351826474070549, -0.0020419007632881403, -0.049951668828725815, -0.017542582005262375, 0.04038676992058754, -0.020023170858621597, 0.034403059631586075, -0.00861892756074667, -0.03936386853456497, -0.04638282582163811, 0.011504063382744789, -0.056614749133586884, -0.04626580327749252, 0.06666793674230576, -0.01130182109773159, 0.06663498282432556, -0.09540534764528275, -0.05065607652068138, -0.01211310364305973, 0.06400817632675171, 0.00693930871784687, -0.005337336100637913, 0.026036422699689865, 0.056317273527383804, 0.003063773037865758, 0.07749482244253159, -0.029293766245245934, -0.012372328899800777, -0.04369281604886055, -0.018213532865047455, -0.045099761337041855, 0.11167959123849869, 0.007183704059571028, -0.07438863068819046, -0.03024991601705551, 0.02620508335530758, -0.0018015197711065412, 0.022538309916853905, 0.04204058647155762, 0.02598986215889454, -0.07205034047365189, -0.014602040871977806, 0.10613619536161423, -0.0187982190400362, -0.059786174446344376, -0.02227085269987583, 0.010397189296782017, 0.02802922949194908, 0.01395933236926794, 0.0013224080903455615, -0.04542853683233261, 0.007496771868318319, 0.03688560426235199, -0.07081905007362366, -0.03030184470117092, -0.021495535969734192, 0.05278512462973595, 0.03376372531056404, -0.07671058177947998, 0.026382436975836754, -0.043319668620824814, -0.0014870314626023173, -0.02053586021065712, -0.04748423397541046, -0.017211342230439186, 0.0005848181899636984, 0.008510063402354717, -0.02520587295293808, 0.08135347068309784, 0.013173876330256462, -0.044871702790260315, 0.034032925963401794, -0.014206592924892902, 0.00011382568482076749, -0.04901042953133583, -0.009800193831324577, 0.05202241614460945, 0.007342723198235035, -0.028382502496242523, 0.0220613032579422, 0.0069669680669903755, -0.007451759185642004, -0.04780291020870209, -0.0325067862868309, 0.02734663151204586, 0.017571019008755684, 0.042907509952783585, 0.051504332572221756, 0.036227524280548096, -0.01927275024354458, -0.0327141210436821, -0.26253971457481384, 0.018391484394669533, -0.05435721203684807, -0.0017113698413595557, 0.06767062842845917, -0.057583365589380264, 0.025981545448303223, -0.042134884744882584, -0.00967755913734436, 0.07978902757167816, 0.07330993562936783, -0.006469004321843386, -0.03456061705946922, 0.0423315167427063, -0.01747739128768444, 0.045321885496377945, 0.019929151982069016, 0.032006558030843735, -0.07234647125005722, -0.036670807749032974, 0.028216760605573654, -0.017855539917945862, -0.0012230320135131478, -0.0866582915186882, 0.0323752723634243, 0.03684508800506592, 0.21253572404384613, 0.03656526654958725, 0.0033691702410578728, -0.011601078324019909, 0.04013707861304283, 0.003731008153408766, -0.019513987004756927, -0.17836865782737732, 0.0528385154902935, 0.05228927358984947, -0.0056069293059408665, 0.0018308083526790142, -0.008354063145816326, 0.006383315194398165, -0.029734838753938675, 0.02973400056362152, -0.021776726469397545, -0.12547935545444489, -0.012737487442791462, -0.011954222805798054, -0.08716189116239548, 0.013039308600127697, -0.04132477939128876, -0.011390657164156437, 0.019332967698574066, 0.0073408642783761024, 0.045863401144742966, 0.08313871920108795, -0.014660886488854885, -0.046954549849033356, -0.04763144999742508, 0.008794031105935574, -0.015965495258569717, 0.012719240039587021, 0.0007320611621253192, -0.01376652903854847, 0.0060641588643193245, -0.06385089457035065, 0.046643469482660294, 0.008376751095056534, -0.025484858080744743, -0.014655780047178268, 0.04791172593832016, -0.058239154517650604, 0.024138139560818672, 0.06400975584983826, -0.005535829812288284, 0.029244160279631615, -0.009928381070494652, 0.03311922401189804, 0.03628475219011307, 0.017706871032714844, -0.03893890231847763, -0.0773497000336647, 0.06926298141479492, -0.05974782258272171, 0.07480033487081528, 0.009881689213216305, 0.02392529882490635, 0.04566476121544838, 0.04428976774215698, -0.01900477334856987, 0.03728649392724037, -0.0004936322802677751, 0.00423747394233942, -0.0009098603622987866, -0.046235695481300354, -0.050713639706373215, 0.03798653930425644, -0.024330949410796165, -0.2906767725944519, 0.0579398088157177, 0.029223931953310966, 0.006411089561879635, -0.01697653718292713, 0.012703308835625648, 0.037308502942323685, 0.034568291157484055, -0.05129916965961456, 0.012072737328708172, 0.055647946894168854, 0.07131339609622955, 0.040050994604825974, -0.027306944131851196, 0.02560611627995968, 0.08197297155857086, 0.061741095036268234, -0.04461507126688957, 0.03891674056649208, -0.03484347462654114, 0.033290963619947433, -0.012568480335175991, 0.22197875380516052, 0.045831672847270966, 0.06279473006725311, 0.03484661504626274, -0.01971561834216118, -0.02664601244032383, 0.01706579327583313, 0.013618899509310722, 0.0036122004967182875, -0.006684319116175175, 0.07469216734170914, -0.04138653725385666, 0.017933785915374756, 0.08067307621240616, -0.01720920018851757, 0.04521742835640907, -0.010590058751404285, -0.02530667930841446, -0.0736682340502739, 0.011327593587338924, -0.02838626131415367, 0.024503983557224274, 0.08348674327135086, -0.06395930051803589, -0.031348541378974915, -0.049871452152729034, 0.008054496720433235, 0.004777450580149889, -0.031758494675159454, -0.020887166261672974, 0.018780890852212906, -0.005253788083791733, 0.014502751640975475, 0.02595178224146366, 0.003132175887003541, -0.028061214834451675, -0.030440988019108772, -0.024406591430306435, 0.04362032562494278, -0.0472356341779232, -0.024382807314395905, -0.010782423429191113, -0.017705896869301796 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
Before you click **Deploy**, make sure to insert the environment variables obtained previously in the tutorial. Grafbase also supports environment variables for preview environments, so if you want to use a different MongoDB database for any Grafbase preview deployment, you can configure that later. , URQL, and Houdini. If you have questions or comments, continue the conversation over in the MongoDB Developer Community.
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.032048068940639496, -0.015040350146591663, 0.02186408080160618, -0.014235897921025753, 0.046102169901132584, -0.014689587987959385, -0.03554341569542885, 0.01145886816084385, -0.015134288929402828, 0.016420645639300346, 0.022054368630051613, -0.05332082137465477, 0.04446163401007652, 0.03673122078180313, 0.006024898961186409, 0.03775956481695175, -0.04413261637091637, 0.03064127452671528, -0.03864496573805809, 0.0002248898963443935, 0.033491235226392746, -0.014675316400825977, 0.011642689816653728, -0.05295164883136749, 0.00007605604332638904, 0.0717729777097702, -0.002106602769345045, -0.00046701659448444843, 0.0008328899857588112, -0.20807915925979614, -0.0020695042330771685, -0.03528556972742081, 0.023709839209914207, -0.016195058822631836, -0.008871476165950298, -0.016467446461319923, -0.018024586141109467, 0.07011309266090393, -0.027477368712425232, 0.06923486292362213, 0.05342623218894005, -0.0028517108876258135, -0.0491572767496109, -0.05573097616434097, -0.026882987469434738, -0.08937002718448639, -0.0027753335889428854, -0.049576785415410995, 0.04389787092804909, -0.03673255443572998, 0.05842423811554909, -0.029133066534996033, -0.005360979586839676, 0.030840879306197166, 0.015259681269526482, 0.025615163147449493, 0.05460934340953827, 0.03886128589510918, 0.009389217011630535, 0.008725026622414589, 0.04334317147731781, 0.028083495795726776, -0.19274987280368805, 0.09888364374637604, 0.024286283180117607, 0.046505291014909744, -0.0543508343398571, -0.06276044994592667, 0.03330925852060318, 0.01813691109418869, -0.00507705332711339, 0.004895960446447134, 0.007441023830324411, 0.053110796958208084, 0.051724668592214584, -0.03133997321128845, -0.01965256780385971, -0.029260195791721344, 0.011413132771849632, -0.033234868198633194, 0.002989986212924123, -0.0687112957239151, -0.020680397748947144, 0.005615697242319584, -0.014494559727609158, -0.04946601763367653, 0.02550402469933033, -0.05700330063700676, 0.04144297167658806, 0.024834340438246727, -0.029645254835486412, -0.031870003789663315, 0.05008845403790474, 0.02107945829629898, -0.07183189690113068, 0.021990541368722916, 0.04050341621041298, -0.023878054693341255, -0.019936084747314453, 0.25834211707115173, -0.01052427850663662, 0.05475690960884094, -0.001718384912237525, -0.0029370675329118967, -0.00015859179256949574, -0.04433823004364967, -0.015043004415929317, 0.014179009944200516, 0.015700513496994972, 0.068929024040699, -0.005657208617776632, -0.03241065517067909, 0.00928102433681488, -0.08987899124622345, 0.007459505461156368, 0.016579916700720787, -0.01394478976726532, 0.04707866162061691, -0.019656946882605553, -0.04570294916629791, 0.03805907815694809, -0.013759913854300976, 0.036435481160879135, 0.013056405819952488, 0.04219068959355354, -0.040115319192409515, 0.040412455797195435, 0.06116216629743576, 0.046291470527648926, 0.018632138147950172, 0.038410674780607224, -0.011400180868804455, -0.06735718250274658, -0.03394046425819397, -0.0029776012524962425, 0.016791880130767822, -0.0027407680172473192, 0.024534277617931366, 0.03372424095869064, 0.03194650635123253, -0.001983246300369501, -0.06219392642378807, -0.01492996420711279, -0.07568966597318649, -0.04858967661857605, 0.09431539475917816, -0.01821739971637726, 0.0933675542473793, -0.07090702652931213, -0.01617472618818283, -0.04357501491904259, 0.07534410059452057, -0.033695369958877563, 0.018492478877305984, 0.0024788849987089634, 0.07680223137140274, -0.005550204310566187, 0.06104521080851555, -0.020381376147270203, 0.014552042819559574, -0.039090596139431, -0.032599855214357376, -0.03576982393860817, 0.07452509552240372, 0.005771349649876356, -0.09165813028812408, -0.03106755018234253, 0.024421164765954018, 0.028899746015667915, 0.016978181898593903, -0.027101531624794006, 0.009208937175571918, -0.0758315920829773, 0.0034673232585191727, 0.12140144407749176, -0.014971648342907429, -0.03797216713428497, -0.014300595037639141, -0.0032261500600725412, -0.00998697616159916, 0.0003112880513072014, -0.038058482110500336, -0.02945214882493019, 0.004746813327074051, 0.03568417206406593, -0.05309031158685684, -0.029099244624376297, -0.030937878414988518, 0.046104319393634796, 0.04380505904555321, -0.02016925811767578, 0.005728120915591717, -0.012277203612029552, 0.005305515136569738, -0.03582349047064781, -0.048177171498537064, -0.01804068684577942, -0.021821681410074234, 0.04476506635546684, -0.050188131630420685, 0.09613431990146637, 0.014746809378266335, -0.015091042965650558, 0.009744547307491302, -0.03796987608075142, 0.02398696355521679, -0.03624080494046211, -0.019342059269547462, 0.020383980125188828, -0.0035116649232804775, -0.0758134052157402, 0.04786210134625435, 0.052268415689468384, 0.0015905806794762611, -0.04057275503873825, -0.0014875176129862666, 0.014379877597093582, 0.05165723338723183, 0.06561045348644257, 0.0244535394012928, 0.00238396180793643, -0.03353249654173851, -0.037309978157281876, -0.2720445990562439, 0.007616898976266384, -0.03097578138113022, 0.02759750932455063, 0.039118386805057526, -0.028081657364964485, 0.028571879491209984, -0.033195484429597855, -0.03913387656211853, 0.07965897023677826, 0.08193616569042206, -0.016541002318263054, 0.013859603554010391, 0.016126131638884544, -0.03597763180732727, 0.06256883591413498, 0.0002043081767624244, 0.008132725954055786, 0.0018716601189225912, -0.013157798908650875, 0.04423145577311516, -0.018839053809642792, 0.0008262687479145825, -0.06704943627119064, 0.05074327811598778, 0.03329522907733917, 0.1813165843486786, 0.03428409993648529, -0.01523673813790083, -0.010661582462489605, 0.07101412862539291, 0.012310833670198917, -0.028751352801918983, -0.19706042110919952, 0.0576934814453125, 0.01444010715931654, 0.033951036632061005, -0.015829134732484818, -0.020204881206154823, -0.03331368416547775, -0.03814469650387764, 0.02777295559644699, 0.01393357664346695, -0.0894584208726883, 0.018815619871020317, -0.02432350441813469, -0.05328018218278885, 0.049391862004995346, -0.028239930048584938, 0.01722237467765808, -0.00336020952090621, 0.02168838307261467, 0.03660651668906212, 0.049579594284296036, -0.016618622466921806, -0.04635808244347572, -0.07752855867147446, 0.004577507730573416, -0.03141713887453079, 0.05130733549594879, 0.010424354113638401, -0.027988452464342117, 0.019263295456767082, -0.027380524203181267, 0.013806859031319618, -0.028482550755143166, -0.026884933933615685, -0.025955993682146072, 0.05947006493806839, -0.04831878840923309, -0.011818939819931984, 0.04433923959732056, -0.030191944912075996, 0.06414304673671722, 0.004813731648027897, 0.029938142746686935, 0.00014833021850790828, 0.0028830834198743105, -0.017602786421775818, -0.08040310442447662, 0.030405323952436447, -0.050757162272930145, 0.048728782683610916, 0.04761828854680061, 0.04528683423995972, 0.042846716940402985, 0.042296476662158966, -0.020554736256599426, 0.04810772463679314, 0.005142525304108858, -0.019570428878068924, -0.0327589176595211, -0.041746750473976135, -0.03420809656381607, 0.014677614904940128, -0.004881920292973518, -0.29273104667663574, 0.062010131776332855, 0.03792425990104675, 0.027648666873574257, -0.01734260842204094, -0.008211241103708744, 0.03126857057213783, -0.012342504225671291, -0.0063629173673689365, -0.014965170063078403, 0.02756238915026188, -0.006117906421422958, 0.03957708179950714, 0.017163675278425217, 0.023215053603053093, 0.03377365320920944, 0.04895244166254997, -0.02004745788872242, 0.018268512561917305, -0.06541875749826431, 0.00852941069751978, 0.02206319570541382, 0.2217324823141098, 0.025228818878531456, 0.026702668517827988, 0.03335912153124809, -0.031253594905138016, 0.03106473572552204, 0.04685811698436737, 0.021357528865337372, 0.014931821264326572, 0.031895361840724945, 0.08616919070482254, -0.053469616919755936, 0.01334814727306366, 0.07466186583042145, -0.0252726748585701, 0.04762323573231697, -0.0006880151340737939, -0.015055770054459572, -0.07491335272789001, -0.0017521008849143982, -0.03946450725197792, 0.03205955773591995, 0.08879228681325912, -0.07689495384693146, -0.013596424832940102, -0.046741217374801636, -0.008047549054026604, -0.03438830003142357, -0.06782875210046768, -0.019184129312634468, -0.0011044468265026808, -0.03585488721728325, 0.03164612129330635, 0.03226202726364136, -0.007835268042981625, -0.009449652396142483, -0.06484318524599075, -0.019312558695673943, 0.04932238161563873, -0.09446287155151367, 0.007640166208148003, 0.03411145508289337, -0.016149666160345078 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
[1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt86a1fb09aa5e51ae/65282bf00749064f73257e71/image6.png [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt67f4040e41799bbc/65282c10814c6c262bc93103/image1.png [3]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt75ca38cd9261e241/65282c30ff3bbd5d44ad0aa3/image4.png
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.03651268780231476, -0.0050010900013148785, 0.03372596204280853, -0.00991231482475996, 0.02992740273475647, 0.023926256224513054, -0.007598471827805042, 0.023347225040197372, -0.003810047172009945, -0.023885449394583702, 0.01655525341629982, -0.08948531746864319, 0.028514496982097626, 0.020947376266121864, 0.06093824282288551, -0.018047820776700974, 0.029368015006184578, 0.025705745443701744, -0.08485417068004608, 0.029946254566311836, 0.031123684719204903, -0.017875589430332184, 0.017975585535168648, -0.047063447535037994, -0.0001492529991082847, 0.018534041941165924, -0.02783370576798916, 0.006033129990100861, -0.03879125416278839, -0.19755031168460846, 0.0010739555582404137, -0.0773792564868927, 0.028227219358086586, -0.06098322570323944, -0.0023834144230931997, -0.027904776856303215, -0.013840681873261929, 0.07275952398777008, -0.04203958436846733, 0.009176033549010754, 0.06349960714578629, -0.04203297942876816, -0.04725944995880127, -0.059104934334754944, -0.013596962206065655, -0.06167200207710266, -0.025038978084921837, -0.030260441824793816, 0.0285223126411438, -0.03983049839735031, -0.0008688588859513402, -0.016322510316967964, 0.0046990602277219296, 0.033903442323207855, 0.043931908905506134, 0.031175196170806885, 0.052459102123975754, 0.044511690735816956, 0.019074391573667526, 0.06675250828266144, 0.021291270852088928, 0.06720853596925735, -0.22573335468769073, 0.09395945817232132, 0.05906030908226967, 0.03031601756811142, -0.02166663110256195, 0.015816958621144295, 0.02040041610598564, 0.04544013366103172, -0.01406568381935358, 0.025414569303393364, 0.022226916626095772, 0.024611227214336395, 0.013851613737642765, -0.05476876720786095, -0.033839285373687744, -0.022723620757460594, -0.04452592879533768, -0.06536947935819626, -0.025533562526106834, 0.0021503425668925047, -0.009642379358410835, -0.017789291217923164, 0.017470667138695717, -0.019144007936120033, -0.04111410677433014, -0.075269415974617, 0.04003999009728432, 0.019975990056991577, 0.006433810107409954, -0.00465806620195508, 0.012178244069218636, 0.030968347564339638, -0.07002229243516922, -0.013327336870133877, 0.029517952352762222, 0.016194738447666168, 0.0053029959090054035, 0.18773818016052246, -0.0710553452372551, 0.0018810821929946542, 0.07175539433956146, -0.007380124181509018, 0.0555322989821434, -0.04313022643327713, -0.00304023246280849, -0.054015859961509705, -0.015106990933418274, 0.04537563398480415, 0.013030987232923508, 0.002626128261908889, 0.04116470366716385, -0.04862262308597565, 0.025279128924012184, 0.0034567825496196747, 0.011652777902781963, 0.017548853531479836, -0.028591318055987358, -0.04608124867081642, -0.005024594720453024, 0.010958373546600342, 0.05494268611073494, -0.00823220331221819, 0.03740954399108887, -0.03889584168791771, 0.05570670962333679, 0.07673019915819168, 0.055428631603717804, 0.04861477389931679, 0.04718958958983421, 0.009786170907318592, -0.00011371977598173544, -0.010323411785066128, -0.030423711985349655, 0.039569154381752014, 0.01002174336463213, -0.016472944989800453, 0.008934203535318375, -0.02933553233742714, -0.03029557876288891, -0.16182133555412292, 0.003153940662741661, -0.10310325771570206, 0.00951977539807558, 0.08867796510457993, -0.008912734687328339, 0.020152004435658455, -0.08517226576805115, 0.0012924091424793005, -0.0021083885803818703, 0.03957046940922737, -0.005353274755179882, 0.0027594927232712507, 0.04152103140950203, 0.010745340026915073, 0.042138248682022095, 0.0927213802933693, -0.022550029680132866, -0.031776368618011475, -0.0026186141185462475, -0.06233292073011398, -0.048912953585386276, 0.10340890288352966, 0.02306447923183441, -0.11611161381006241, -0.004946019500494003, -0.010301582515239716, 0.0043609957210719585, -0.007853865623474121, -0.02389732375741005, 0.04175206273794174, -0.02960856258869171, -0.019282013177871704, 0.11010869592428207, 0.04040005803108215, -0.04598166048526764, -0.0015639481134712696, 0.02140539325773716, 0.03724416345357895, 0.00361780752427876, -0.02721538208425045, -0.03565617650747299, 0.08467550575733185, 0.009041831828653812, -0.07579566538333893, 0.024570059031248093, -0.04476763308048248, 0.04680749401450157, 0.08073320984840393, -0.004112845286726952, 0.004734613932669163, -0.037063948810100555, 0.014261266216635704, -0.020778032019734383, -0.04631252586841583, -0.04188217595219612, -0.022308852523565292, -0.02877429500222206, -0.0582122839987278, 0.0946875512599945, -0.022436168044805527, -0.031994812190532684, 0.0040660640224814415, -0.05466260015964508, 0.022822825238108635, 0.002040337538346648, 0.003218358848243952, 0.06329336017370224, 0.04519074037671089, -0.03196301311254501, 0.02803119085729122, 0.006537331268191338, -0.01772174797952175, 0.034458257257938385, -0.03661343827843666, 0.03710590675473213, 0.029249252751469612, 0.00034750034683384, 0.03717127814888954, 0.03860476613044739, -0.09532678127288818, -0.0827120989561081, -0.2165464609861374, 0.0023810118436813354, -0.004935659002512693, -0.03570385277271271, 0.010082368738949299, -0.025687364861369133, 0.020771518349647522, -0.014983190223574638, 0.009804031811654568, 0.05519041046500206, 0.07865152508020401, -0.01053738221526146, -0.019296202808618546, 0.02357822097837925, -0.014908550307154655, 0.005848755594342947, -0.015340975485742092, 0.005307592451572418, -0.02551957033574581, -0.040771059691905975, -0.05426482856273651, 0.02095031924545765, 0.006082753650844097, -0.08200810104608536, 0.03706502541899681, -0.037942495197057724, 0.2265552431344986, 0.07948033511638641, -0.0045197345316410065, -0.012041233479976654, 0.03505978360772133, 0.036876481026411057, -0.025836743414402008, -0.09486764669418335, 0.039175521582365036, 0.04555342346429825, 0.012244876474142075, -0.0164178479462862, -0.009164203889667988, -0.027085574343800545, -0.005126102361828089, 0.04757755994796753, -0.01833159849047661, -0.06022422015666962, 0.017836477607488632, -0.02298099733889103, -0.044160544872283936, 0.009188580326735973, -0.00359922437928617, 0.018371503800153732, 0.011213362216949463, 0.02024606429040432, 0.010342838242650032, 0.004650109447538853, -0.011447249911725521, -0.03300778567790985, -0.07326186448335648, 0.005758237559348345, -0.008586430922150612, 0.06093502417206764, -0.03881092369556427, -0.0695098489522934, 0.009174232371151447, -0.0690055713057518, 0.06635589897632599, 0.037786632776260376, -0.01946398802101612, -0.0375625379383564, 0.01261232327669859, -0.02879120409488678, -0.027540922164916992, 0.09710464626550674, 0.021542487666010857, -0.03575768694281578, 0.06371256709098816, 0.022638902068138123, 0.024981830269098282, 0.006295790430158377, 0.0292328130453825, -0.02643084153532982, 0.04935970529913902, -0.006996341980993748, 0.008059229701757431, 0.051818884909152985, 0.03767585754394531, 0.019773492589592934, 0.03701717033982277, -0.04326273873448372, 0.057849984616041183, -0.06814632564783096, -0.03217681124806404, -0.008479940705001354, -0.04415528103709221, -0.0007740788860246539, 0.010298965498805046, 0.012759238481521606, -0.34715819358825684, 0.07309424132108688, 0.03595820069313049, 0.028819918632507324, 0.011340315453708172, 0.022037910297513008, 0.03549795597791672, 0.007055299356579781, -0.04081987962126732, 0.0010996069759130478, 0.01399967446923256, 0.03460073098540306, 0.03671525418758392, -0.02564503438770771, -0.002622969914227724, 0.04085326939821243, 0.03839971125125885, -0.03982413932681084, 0.04348592087626457, -0.04879113659262657, -0.0000029926432034699246, 0.015127954073250294, 0.22263890504837036, -0.008153079077601433, -0.03844854608178139, 0.010472218506038189, -0.0006338473758660257, 0.013546451926231384, 0.02494238130748272, 0.025397304445505142, 0.030514199286699295, 0.013060562312602997, 0.06068287417292595, -0.026615379378199577, 0.020173916593194008, 0.07407157123088837, -0.08557739853858948, 0.018157687038183212, -0.0023135265801101923, -0.02351907454431057, -0.024958910420536995, 0.02198135294020176, -0.05466264858841896, -0.027326447889208794, 0.08822033554315567, -0.013960636220872402, 0.0017556017264723778, -0.0420517735183239, 0.02873527817428112, -0.0013837221777066588, -0.056532084941864014, 0.004755696281790733, -0.019172949716448784, 0.005423376802355051, 0.040858782827854156, 0.016165971755981445, -0.0023640929721295834, -0.024321299046278, -0.0401754230260849, 0.01123757753521204, 0.031563710421323776, -0.030605074018239975, -0.018011322245001793, 0.0191277414560318, 0.03969080373644829 ]
devcenter
https://www.mongodb.com/developer/products/atlas/instant-graphql-apis-mongodb-grafbase
created
[4]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltaf2a2af39e731dbe/65282c54391807638d3b0e1d/image5.png [5]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt0c9563b3fdbf34fd/65282c794824f57358f273cf/image3.png [6]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt731c99011d158491/65282ca631f9bbb92a9669ad/image2.png
md
{ "tags": [ "Atlas", "TypeScript", "GraphQL" ], "pageDescription": "Learn how to quickly and easily create a GraphQL API from your MongoDB data with Grafbase.", "contentType": "Tutorial" }
Instant GraphQL APIs for MongoDB with Grafbase
2024-05-20T17:32:23.500Z
[ -0.032542746514081955, 0.0026832344010472298, 0.026951320469379425, -0.02318979799747467, 0.031845156103372574, 0.010651635006070137, -0.0010173850459977984, 0.011552304960787296, -0.0025988540146499872, -0.026464473456144333, 0.029528485611081123, -0.07951211929321289, 0.032484155148267746, 0.02143668942153454, 0.03268740326166153, -0.004050065763294697, 0.033822908997535706, 0.03034740686416626, -0.06241496652364731, 0.026812098920345306, 0.051927633583545685, -0.03359910100698471, 0.021579498425126076, -0.07328656315803528, 0.00848721619695425, 0.01898588053882122, -0.028557103127241135, 0.007857552729547024, -0.04666439816355705, -0.18698939681053162, -0.010125288739800453, -0.07276199758052826, 0.022518999874591827, -0.05482771247625351, 0.008416792377829552, -0.018699362874031067, -0.04343819618225098, 0.07080287486314774, -0.03275196999311447, 0.03984874486923218, 0.05312594398856163, -0.04392552748322487, -0.05048687383532524, -0.04427134618163109, -0.043905261904001236, -0.0454833060503006, -0.023790549486875534, -0.018312323838472366, 0.03331327065825462, -0.043673038482666016, 0.014166475273668766, -0.02176029235124588, -0.02317269705235958, 0.04978268966078758, 0.0334961824119091, 0.025763310492038727, 0.08191357553005219, 0.0368482731282711, 0.013737364672124386, 0.06793548911809921, 0.04694432392716408, 0.08656854182481766, -0.2293243110179901, 0.07763627171516418, 0.058168210089206696, 0.02316511794924736, -0.032895442098379135, 0.012715973891317844, -0.0008293214486911893, 0.05187252163887024, -0.03698378801345825, 0.02762640453875065, 0.009935497306287289, 0.0148790143430233, 0.006069198250770569, -0.03136782348155975, -0.03212941437959671, -0.028730176389217377, -0.03876781836152077, -0.04173969849944115, -0.020431261509656906, 0.0020770186092704535, -0.014326962642371655, -0.0231709536164999, 0.013085588812828064, -0.010764408856630325, -0.047390714287757874, -0.09096978604793549, 0.04276955500245094, 0.04221922531723976, -0.017162028700113297, 0.004722637124359608, -0.013286042958498001, 0.02101503685116768, -0.07493558526039124, -0.024694401770830154, 0.03537806496024132, -0.007012408692389727, -0.015288174152374268, 0.17863106727600098, -0.10020193457603455, 0.013444280251860619, 0.05793975666165352, -0.0051990351639688015, 0.022072097286581993, -0.0406508632004261, 0.007216969504952431, -0.028935981914401054, -0.014389486983418465, 0.0339554026722908, 0.008982363156974316, -0.015265403315424919, 0.06810751557350159, -0.036382611840963364, 0.01401201169937849, -0.01589461974799633, 0.013902638107538223, 0.003354076063260436, -0.04699402675032616, -0.019024847075343132, -0.004422779660671949, 0.0299143735319376, 0.045659054070711136, -0.0012420431012287736, 0.05001385137438774, -0.026929840445518494, 0.03815054893493652, 0.0999053344130516, 0.06325922161340714, 0.0528666228055954, 0.06675193458795547, 0.017142288386821747, 0.02145838737487793, -0.010584909468889236, -0.027229860424995422, 0.044139910489320755, 0.011874799616634846, -0.031147100031375885, 0.017718596383929253, -0.03855302929878235, -0.032019663602113724, -0.16398704051971436, -0.004288021009415388, -0.08198170363903046, 0.006639629602432251, 0.08932728320360184, -0.012359842658042908, 0.015183636918663979, -0.08858116716146469, 0.01456126943230629, 0.008113974705338478, 0.05730535089969635, -0.009908119216561317, 0.019145537167787552, 0.021500252187252045, 0.011602162383496761, 0.0358525887131691, 0.07742038369178772, -0.047283630818128586, -0.015220342203974724, -0.02340208925306797, -0.05940021201968193, -0.03564945235848427, 0.10335105657577515, 0.01869991049170494, -0.0919906347990036, -0.01489813718944788, 0.0032328360248357058, -0.003998183645308018, -0.014205950312316418, -0.0396590456366539, 0.04613989219069481, -0.025818992406129837, 0.006991943344473839, 0.11814943701028824, 0.026550492271780968, -0.044733233749866486, -0.0037365045864135027, -0.005970538593828678, 0.030938630923628807, 0.007831985130906105, -0.02911316230893135, -0.05378304049372673, 0.07704559713602066, -0.006588255520910025, -0.05559689551591873, 0.007942460477352142, -0.0650544986128807, 0.06933099776506424, 0.05477580800652504, -0.013746795244514942, 0.00492554297670722, -0.04151371493935585, 0.021029410883784294, -0.03449685126543045, -0.0532652921974659, -0.05359544977545738, -0.060819219797849655, -0.009125301614403725, -0.052578482776880264, 0.08329831808805466, -0.0013170718448236585, -0.04031910002231598, 0.0030364717822521925, -0.02617756277322769, 0.019545527175068855, 0.00682762311771512, 0.02586236782371998, 0.05572141706943512, 0.041363850235939026, -0.02837199717760086, 0.03721333667635918, 0.03149338439106941, -0.01380313653498888, 0.021872371435165405, -0.025112446397542953, 0.030318502336740494, 0.039534345269203186, 0.018056683242321014, 0.01665511727333069, 0.016548367217183113, -0.11358189582824707, -0.08555125445127487, -0.22058144211769104, 0.012159722857177258, -0.019216591492295265, -0.04082784056663513, 0.022327259182929993, -0.023880116641521454, 0.026390332728624344, -0.007224858272820711, 0.0017194320680573583, 0.057281170040369034, 0.09287341684103012, -0.0037977229803800583, -0.011601021513342857, 0.005659676156938076, -0.00024166145885828882, 0.025484325364232063, 0.008748556487262249, -0.005536684766411781, -0.02949019894003868, -0.04357627034187317, -0.04321381449699402, 0.011972985230386257, -0.00631745858117938, -0.0684192106127739, 0.03136519715189934, -0.03335271030664444, 0.24020755290985107, 0.08121300488710403, 0.009462880901992321, 0.00659742159768939, 0.05036192387342453, 0.053839199244976044, -0.023238280788064003, -0.0768357366323471, 0.041712526232004166, 0.050156913697719574, 0.013043657876551151, -0.010926387272775173, -0.02359004318714142, -0.035137839615345, 0.004385981243103743, 0.040824342519044876, -0.03211529180407524, -0.060085032135248184, 0.013487345539033413, -0.01589605212211609, -0.05534028261899948, 0.020489146932959557, 0.006323821377009153, 0.02828982286155224, 0.009113701991736889, 0.006240230984985828, 0.006491750944405794, -0.002482849406078458, 0.006750605069100857, -0.04821046441793442, -0.06444977968931198, 0.0007008393877185881, 0.007696992252022028, 0.07664026319980621, -0.040287964046001434, -0.05488964542746544, -0.0022537445183843374, -0.06555996835231781, 0.04365704953670502, 0.027079807594418526, -0.028632061555981636, -0.022967081516981125, 0.023399902507662773, -0.03502148017287254, -0.02638067491352558, 0.10227875411510468, 0.016123967245221138, -0.017135247588157654, 0.07441139966249466, 0.017815452069044113, 0.01696518436074257, 0.0075838323682546616, 0.0175508800894022, -0.04795331507921219, 0.06723874807357788, -0.013685393147170544, 0.0035515278577804565, 0.03089670091867447, 0.024751679971814156, 0.028153173625469208, 0.014276326633989811, -0.0387798547744751, 0.05587660148739815, -0.05884464457631111, 0.003019695868715644, -0.00355599750764668, -0.05749164894223213, -0.01373337022960186, 0.02082955837249756, 0.01007859967648983, -0.337215781211853, 0.08274044841527939, 0.038320790976285934, 0.036970105022192, 0.000900017621461302, 0.02399716153740883, 0.03902554139494896, 0.014803840778768063, -0.032460469752550125, 0.014653678983449936, -0.007046587765216827, 0.0358327217400074, 0.04468271881341934, -0.05618942901492119, -0.010698873549699783, 0.049563463777303696, 0.018102699890732765, -0.04248536005616188, 0.04409383609890938, -0.032772526144981384, 0.0011811258736997843, 0.014045927673578262, 0.22816546261310577, -0.017843082547187805, -0.032174959778785706, 0.022816911339759827, -0.014581557363271713, -0.0013788776705041528, 0.03245091810822487, 0.017996083945035934, 0.01278678234666586, -0.018355954438447952, 0.04578286409378052, 0.0004640033876057714, 0.018760263919830322, 0.0662812739610672, -0.06779132038354874, 0.010822459124028683, 0.020340947434306145, -0.04905814677476883, -0.026807744055986404, 0.004232905805110931, -0.052385926246643066, -0.026963207870721817, 0.09543604403734207, 0.0025867989752441645, 0.0028989845886826515, -0.04159287363290787, 0.018797073513269424, 0.012072361074388027, -0.035137731581926346, 0.010682884603738785, -0.020274830982089043, 0.009954269044101238, 0.04119966924190521, 0.029414106160402298, -0.014185871928930283, -0.023197423666715622, -0.030417146161198616, 0.02372709847986698, 0.019847409799695015, -0.04386882856488228, -0.0024166491348296404, 0.020726261660456657, 0.036623887717723846 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
# Exploring Window Operators in Atlas Stream Processing > Atlas Stream Processing is now available. Learn more about it here. In our previous post on windowing, we introduced window operators available in Atlas Stream Processing. Window operators are one of the most commonly used operations to effectively process streaming data. Atlas Stream Processing provides two window operators: $tumblingWindow and $hoppingWindow. In this tutorial, we will explore both of these operators using the sample solar data generator provided within Atlas Stream Processing. ## Getting started Before we begin creating stream processors, make sure you have a database user who has “atlasAdmin” access to the Atlas Project. Also, if you do not already have a Stream Processing Instance created with a connection to the sample_stream_solar data generator, please follow the instructions in Get Started with Atlas Stream Processing: Creating Your First Stream Processor and then continue on. ## View the solar stream sample data
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.048927512019872665, -0.003921780269593, 0.04130646586418152, -0.004971460439264774, 0.017873959615826607, 0.0039832135662436485, 0.04579886049032211, -0.015007194131612778, -0.0012598464963957667, -0.02444789744913578, -0.009361923672258854, -0.04687841609120369, -0.019811274483799934, 0.009019111283123493, 0.017321893945336342, -0.005526249762624502, 0.0006627022521570325, 0.03325701877474785, -0.04810699075460434, 0.0023726762738078833, 0.026598569005727768, -0.03716973960399628, -0.049072667956352234, -0.07176171243190765, 0.023335127159953117, 0.027766654267907143, -0.08081362396478653, -0.028438357636332512, -0.04497317969799042, -0.232866570353508, 0.013229874894022942, -0.057817719876766205, 0.027748912572860718, -0.050641562789678574, -0.010698527097702026, -0.05314704403281212, -0.02987288311123848, 0.051985111087560654, -0.05033700913190842, 0.03947877511382103, 0.05982058867812157, 0.004076089709997177, -0.023495761677622795, -0.028671838343143463, -0.053871579468250275, -0.05332465469837189, -0.01879744417965412, -0.007447286043316126, 0.008340174332261086, 0.01956583932042122, -0.03298332169651985, -0.03961419686675072, 0.04821152240037918, 0.015319576486945152, 0.028409434482455254, 0.00808417983353138, 0.049147188663482666, 0.061313480138778687, 0.032815903425216675, 0.028233254328370094, 0.013648370280861855, -0.01571132242679596, -0.19893750548362732, 0.0748058333992958, 0.03155847638845444, 0.04302455112338066, 0.007211263291537762, -0.027219142764806747, 0.02224537543952465, 0.01146314200013876, -0.04086729511618614, 0.021249689161777496, -0.013508377596735954, 0.02880462445318699, 0.003939375746995211, -0.008092266507446766, -0.061699818819761276, -0.021061113104224205, -0.022296905517578125, 0.017580440267920494, 0.005090675316751003, -0.026605596765875816, 0.0033611198887228966, 0.0030521429143846035, -0.03391856700181961, 0.04586082696914673, 0.028576018288731575, -0.008187456987798214, 0.05631982162594795, 0.002617974765598774, -0.03827684000134468, -0.0015621950151398778, -0.008485990576446056, 0.04878377541899681, -0.022250281646847725, -0.0027199166361242533, 0.05617135018110275, 0.028931239619851112, 0.005019049160182476, 0.20534102618694305, -0.027997134253382683, 0.03194459155201912, 0.0702802836894989, -0.026748400181531906, 0.028160974383354187, -0.04890226572751999, -0.04215449467301369, -0.006686114240437746, -0.044147271662950516, -0.0018450760981068015, -0.007525961846113205, -0.01336674951016903, 0.03765670210123062, -0.051026277244091034, 0.04255253076553345, -0.024188384413719177, 0.005817288067191839, 0.0025908651296049356, -0.015145858749747276, 0.03667118772864342, -0.017828112468123436, -0.010307480581104755, 0.07578332722187042, 0.014394378289580345, 0.030179135501384735, -0.05136474594473839, 0.07021789997816086, 0.11067451536655426, 0.007220074068754911, 0.06146072968840599, 0.058530449867248535, -0.036033399403095245, -0.06395614147186279, 0.011001796461641788, 0.006429211236536503, -0.013256204314529896, -0.0012140393955633044, -0.018529187887907028, -0.019831545650959015, -0.024722391739487648, -0.0520239882171154, -0.011916384100914001, 0.038998812437057495, -0.11337152123451233, -0.022913483902812004, 0.15254326164722443, -0.07215836644172668, 0.04482224956154823, -0.054757166653871536, -0.0037941925693303347, 0.002266528783366084, 0.03418122977018356, -0.05146506428718567, -0.017299365252256393, 0.012553670443594456, 0.02213757112622261, 0.027981625869870186, 0.09567336738109589, -0.06280223280191422, 0.04750855639576912, -0.02309075929224491, -0.050824038684368134, -0.01995156705379486, 0.0802789106965065, 0.01216448936611414, -0.11907690763473511, -0.04558074474334717, 0.02539936453104019, 0.012350287288427353, 0.024386558681726456, 0.00880199484527111, 0.030104171484708786, -0.027268923819065094, -0.021683385595679283, 0.07756093144416809, 0.020143456757068634, -0.07392135262489319, -0.010379689745604992, -0.016354074701666832, 0.01934126205742359, 0.05347264185547829, -0.03954605013132095, -0.020050974562764168, 0.009102551266551018, 0.04122990369796753, -0.04615679755806923, -0.00581261795014143, -0.03184942156076431, -0.0018036256078630686, 0.02529095858335495, -0.06229764223098755, -0.006267995573580265, 0.019643882289528847, -0.04656974971294403, -0.024100935086607933, -0.030459221452474594, 0.013241332024335861, -0.04421079158782959, -0.003580438205972314, -0.016335830092430115, 0.07499711960554123, 0.019911879673600197, -0.0291643925011158, 0.050371069461107254, 0.0019414230482652783, -0.001943520619533956, -0.023746155202388763, -0.03499409928917885, 0.021580500528216362, 0.027666205540299416, -0.025290071964263916, -0.020470108836889267, 0.02070852369070053, 0.010529596358537674, -0.025354569777846336, -0.002950122347101569, 0.003965641837567091, 0.031540147960186005, -0.0016043377108871937, 0.05013952776789665, 0.014374510385096073, -0.07709700614213943, -0.09392441809177399, -0.26113569736480713, 0.011603026650846004, 0.008994312025606632, 0.0167392585426569, -0.015334785915911198, -0.054734233766794205, 0.04183583706617355, -0.018364418298006058, -0.005568001884967089, 0.05866038054227829, 0.04226110503077507, 0.004789181053638458, 0.008801459334790707, -0.03293849155306816, 0.002453927183523774, 0.06373931467533112, 0.020344045013189316, 0.028603116050362587, -0.02721106819808483, -0.005574696697294712, -0.0007063801749609411, 0.05177053064107895, 0.021095016971230507, -0.07628908008337021, 0.05966765061020851, 0.022659871727228165, 0.17502297461032867, 0.050964441150426865, 0.060831114649772644, -0.023137517273426056, 0.07325529307126999, 0.0077520026825368404, -0.033162135630846024, -0.08423071354627609, 0.030895093455910683, 0.07693912088871002, 0.022108545526862144, 0.032457903027534485, -0.004784147720783949, -0.022377127781510353, -0.03379900008440018, 0.043191734701395035, 0.0020347703248262405, -0.08878855407238007, -0.01621805876493454, -0.01799802854657173, -0.02898286283016205, 0.004184602294117212, -0.03503768518567085, 0.0006006730254739523, 0.005220790393650532, -0.0216653011739254, 0.03588229790329933, -0.012415812350809574, -0.0028972006402909756, -0.0333135612308979, -0.058276597410440445, 0.08808054774999619, -0.041120823472738266, 0.03650227561593056, 0.008516988717019558, -0.048386141657829285, 0.020934877917170525, -0.0005203491891734302, 0.05923111364245415, -0.016248207539319992, 0.009753338992595673, -0.047681115567684174, 0.05126313120126724, -0.03627887740731239, -0.05069804564118385, 0.08012770861387253, -0.05630747228860855, -0.014804081991314888, 0.02511908859014511, 0.05424601584672928, 0.01385654229670763, -0.02669590525329113, 0.024761734530329704, -0.04981394112110138, 0.020465191453695297, -0.009160270914435387, 0.04513397812843323, 0.028029635548591614, 0.07483016699552536, 0.03550287336111069, 0.028640134260058403, -0.012208990752696991, -0.011670645326375961, -0.03277134895324707, 0.02157650701701641, 0.003976518288254738, -0.03991679847240448, -0.0430549681186676, 0.037653326988220215, 0.015261823311448097, -0.3133809268474579, 0.03093010000884533, -0.00009550694085191935, -0.013491597026586533, -0.044969718903303146, -0.027454640716314316, 0.049633730202913284, 0.042291078716516495, -0.03568022698163986, 0.015775995329022408, -0.023663947358727455, 0.044084906578063965, 0.0058289701119065285, -0.014445201493799686, 0.027461810037493706, 0.06926637887954712, 0.0741291418671608, -0.02307380922138691, 0.014277144335210323, -0.038776710629463196, 0.06792152673006058, 0.013671995140612125, 0.26641905307769775, 0.007845863699913025, 0.03380774334073067, 0.034708816558122635, -0.02171640284359455, 0.011148866266012192, 0.022239234298467636, -0.02520398423075676, 0.001373011851683259, 0.013812413439154625, 0.10586290806531906, -0.042346104979515076, 0.04072269797325134, 0.03332078084349632, -0.019827017560601234, 0.05793284252285957, 0.06023019552230835, -0.040247105062007904, -0.016923392191529274, 0.05339496582746506, -0.013701132498681545, -0.02437419258058071, 0.08649729192256927, -0.017762186005711555, 0.016313130035996437, -0.08610561490058899, -0.0243314690887928, 0.02347596362233162, -0.05141976475715637, -0.003918132744729519, -0.013645474798977375, 0.020824577659368515, 0.010038304142653942, 0.02582123689353466, -0.08965470641851425, -0.04921524226665497, -0.02329842559993267, 0.02514078840613365, 0.05069950968027115, -0.09783326834440231, 0.007191018667072058, 0.013228412717580795, 0.00767116341739893 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
## View the solar stream sample data For this tutorial, we will be using the MongoDB shell. First, confirm sample_stream_solar is added as a connection by issuing `sp.listConnections()`. ``` AtlasStreamProcessing> sp.listConnections() { ok: 1, connections: { name: 'sample_stream_solar', type: 'inmemory', createdAt: ISODate("2023-08-26T18:42:48.357Z") } ] } ``` Next, let’s define a **$source** stage to describe where Atlas Stream Processing will read the stream data from. ``` var solarstream={ $source: { "connectionName": "sample_stream_solar" } } ``` Then, issue a **.process** command to view the contents of the stream on the console. ``` sp.process([solarstream]) ```
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.05985584482550621, 0.011241280473768711, 0.01399822998791933, -0.02559373527765274, 0.024506209418177605, -0.024106847122311592, 0.04378458485007286, -0.013441276736557484, -0.025579752400517464, -0.01239199098199606, 0.0058982293121516705, -0.040709663182497025, -0.017621947452425957, 0.02196154184639454, -0.004951581358909607, 0.003982188180088997, -0.0010406646179035306, 0.026952659711241722, -0.04225614666938782, 0.012566500343382359, 0.041538409888744354, -0.03646957129240036, -0.05340170860290527, -0.06942734122276306, 0.020671343430876732, 0.06535427272319794, -0.019763419404625893, -0.049305591732263565, -0.045261822640895844, -0.24257206916809082, -0.008753267116844654, -0.074587382376194, 0.03193056955933571, -0.06062839925289154, 0.004433720372617245, -0.050959136337041855, -0.007640732452273369, 0.004852930083870888, -0.04813310131430626, 0.05114595592021942, 0.06908115744590759, 0.00010341962479287758, -0.037203866988420486, -0.04732760787010193, -0.0663229450583458, -0.07989761233329773, -0.0011070499895140529, -0.025602860376238823, 0.02775723673403263, -0.03327644616365433, -0.047182150185108185, -0.060062892735004425, 0.011781695298850536, 0.014718910679221153, 0.04341002553701401, 0.05448972433805466, 0.045740094035863876, 0.05574443191289902, 0.03374539688229561, 0.035536084324121475, 0.041716769337654114, 0.013843146152794361, -0.22045394778251648, 0.08078500628471375, 0.045705195516347885, 0.07213419675827026, -0.016425730660557747, 0.01643075793981552, 0.023028364405035973, -0.03330916166305542, -0.021304329857230186, 0.03126467391848564, 0.005451376084238291, 0.04253971949219704, -0.003085539909079671, -0.006087625864893198, -0.055451519787311554, -0.05244377255439758, 0.013654269278049469, 0.030421698465943336, -0.02803199738264084, -0.024020608514547348, 0.004863593261688948, 0.02449345588684082, -0.02596423588693142, 0.010486599057912827, 0.026911795139312744, -0.0183224119246006, 0.040412820875644684, 0.03821568191051483, -0.046200115233659744, -0.02316909469664097, -0.008969977498054504, 0.0629950612783432, -0.06569798290729523, 0.016425471752882004, 0.05134670436382294, 0.025040695443749428, 0.047673434019088745, 0.18974272906780243, -0.04442796856164932, 0.06692013144493103, 0.033706240355968475, -0.0055056181736290455, 0.02187146432697773, -0.028609899803996086, -0.016430044546723366, -0.02109936624765396, 0.01519424095749855, 0.026123162358999252, -0.01555348839610815, -0.0233616940677166, 0.006433132570236921, -0.07290573418140411, 0.05420084670186043, 0.014554636552929878, 0.016909124329686165, 0.01423570979386568, -0.04521471634507179, 0.040445297956466675, 0.017483755946159363, 0.01666378602385521, 0.08102240413427353, 0.03841353952884674, 0.056635983288288116, -0.041785359382629395, 0.09817343950271606, 0.08209159225225449, 0.011235317215323448, 0.04835993051528931, 0.04648180305957794, -0.015929965302348137, -0.0874127447605133, -0.020939886569976807, 0.0030719349160790443, 0.0383763425052166, -0.018490931019186974, -0.024456584826111794, 0.016127385199069977, -0.013799780048429966, -0.014120973646640778, -0.03337197005748749, -0.013510238379240036, -0.13306628167629242, -0.0028764635790139437, 0.13892154395580292, -0.03457178175449371, 0.0870295986533165, -0.08299297094345093, -0.018436038866639137, 0.01361708715558052, 0.041117776185274124, -0.05518535524606705, -0.007737348787486553, -0.005491865333169699, 0.01296139881014824, 0.022897837683558464, 0.08792081475257874, -0.03038126416504383, 0.04322075843811035, -0.018802233040332794, -0.006386103108525276, -0.036518048495054245, 0.07662007957696915, 0.02798709273338318, -0.08786628395318985, -0.015414067544043064, 0.0073446487076580524, 0.00703581515699625, 0.0005860225646756589, -0.013810898177325726, 0.04680069535970688, -0.0367363803088665, -0.02172188088297844, 0.09787815064191818, 0.005909719504415989, -0.04009252414107323, -0.024405501782894135, 0.002061678795143962, 0.018602464348077774, 0.03583783283829689, -0.010882013477385044, -0.029482483863830566, 0.01019950769841671, 0.03161855787038803, -0.037065763026475906, -0.02765013463795185, -0.021630071103572845, -0.0035918117500841618, 0.04756569117307663, -0.05226660147309303, -0.015512409619987011, 0.01877477392554283, -0.02086903154850006, -0.04396039620041847, -0.050706613808870316, 0.019823528826236725, -0.04210316389799118, -0.004883707966655493, -0.05641578882932663, 0.10483007878065109, 0.025978686287999153, -0.033508025109767914, 0.055322855710983276, -0.014225918799638748, 0.00017259718151763082, -0.04837973415851593, -0.014605440199375153, 0.0462631918489933, -0.010921470820903778, -0.05503064766526222, 0.016011863946914673, 0.020774047821760178, 0.01158339623361826, -0.020386815071105957, 0.0005445171264000237, 0.038306824862957, 0.02838408201932907, 0.028504202142357826, 0.03573302552103996, 0.013174985535442829, -0.09203699976205826, -0.07509654760360718, -0.253318727016449, 0.05045415833592415, 0.008596164174377918, 0.025515500456094742, -0.00466698594391346, -0.048767078667879105, 0.018857399001717567, -0.02416650578379631, -0.019974472001194954, 0.047261856496334076, 0.07139629125595093, 0.0019414135022088885, 0.01683155633509159, -0.042591825127601624, -0.008143281564116478, 0.0494798943400383, 0.015448249876499176, -0.017503123730421066, -0.02092355117201805, 0.012926108203828335, -0.01883029192686081, 0.01732078194618225, 0.0013789378572255373, -0.0562303327023983, 0.02940470352768898, 0.00770367169752717, 0.17500649392604828, 0.05009462684392929, 0.02666032500565052, -0.05822430178523064, 0.06295869499444962, -0.0022722743451595306, -0.011259322986006737, -0.10662275552749634, -0.00090300157899037, 0.04760567843914032, 0.028785383328795433, 0.04686883091926575, 0.014493613503873348, -0.028282776474952698, -0.05035422742366791, 0.02914116531610489, 0.006856938358396292, -0.07963861525058746, -0.0078070820309221745, -0.02990015223622322, -0.02875550463795662, 0.01678016409277916, -0.059692174196243286, 0.0028229595627635717, 0.008565475232899189, 0.02024627849459648, 0.04199238121509552, -0.03402286022901535, -0.011648678220808506, -0.011966172605752945, -0.06654811650514603, 0.04930655285716057, -0.042603999376297, 0.06122131273150444, 0.00964832678437233, 0.006389928981661797, 0.011813265271484852, -0.021865887567400932, 0.04107382148504257, 0.0033280581701546907, -0.01688680239021778, -0.03302577883005142, 0.04534692317247391, -0.03441996872425079, -0.021596582606434822, 0.0506659597158432, -0.01779671013355255, 0.007094657048583031, 0.028944378718733788, 0.03991004079580307, -0.009063035249710083, -0.06462109833955765, -0.007111281622201204, -0.039030320942401886, 0.03475695103406906, -0.04330836236476898, 0.014953295700252056, 0.025529155507683754, 0.03682055324316025, 0.06367795169353485, 0.023514796048402786, -0.021501289680600166, 0.016904566437005997, -0.03543798252940178, -0.015683604404330254, -0.026884909719228745, -0.04288691282272339, -0.06753865629434586, 0.03378724306821823, 0.0118106659501791, -0.2959243655204773, 0.03539504110813141, -0.034712016582489014, -0.0075822570361196995, -0.02475922182202339, 0.0021685492247343063, 0.07576671987771988, 0.03556134179234505, -0.013298011384904385, 0.023739319294691086, 0.020163003355264664, 0.013587319292128086, -0.00458773598074913, -0.012241022661328316, 0.023227419704198837, 0.07784226536750793, 0.03756651654839516, -0.029416678473353386, 0.018478170037269592, -0.045592233538627625, 0.06488337367773056, 0.05795835331082344, 0.2340731918811798, 0.01135723665356636, 0.016801973804831505, 0.07387670129537582, -0.03959748521447182, 0.05624605342745781, 0.067693330347538, -0.007300056517124176, 0.00136607326567173, 0.01407661847770214, 0.09454488009214401, -0.023037059232592583, 0.03684019297361374, 0.05049413815140724, -0.01818866655230522, 0.03485129028558731, 0.06611351668834686, -0.044918838888406754, -0.03552336245775223, 0.021371638402342796, -0.013572382740676403, -0.0104529382660985, 0.08503034710884094, -0.03578558564186096, -0.026522506028413773, -0.10797940194606781, 0.01588759571313858, 0.0024290517903864384, -0.07408872991800308, -0.025029556825757027, 0.012386009097099304, 0.004681217949837446, -0.0045496379025280476, 0.0019462064374238253, -0.027314504608511925, -0.016972268000245094, -0.023489855229854584, -0.007693838328123093, 0.052567463368177414, -0.09372972697019577, 0.04419250041246414, -0.005897128023207188, -0.005928804166615009 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
``` sp.process([solarstream]) ``` You will see the stream of solar data printed on the console. A sample of this data is as follows: ```json { device_id: 'device_2', group_id: 3, timestamp: '2023-08-27T13:51:53.375+00:00', max_watts: 250, event_type: 0, obs: { watts: 168, temp: 15 }, _ts: ISODate("2023-08-27T13:51:53.375Z"), _stream_meta: { sourceType: 'sampleData', timestamp: ISODate("2023-08-27T13:51:53.375Z") } } ``` ## Create a tumbling window query
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.04297640919685364, 0.012074882164597511, 0.027006974443793297, -0.02037661150097847, 0.0616239532828331, -0.04768279194831848, 0.05545692890882492, -0.02141115628182888, 0.037646740674972534, 0.00899985060095787, -0.006340178195387125, -0.07149219512939453, -0.013234755024313927, 0.006482586730271578, -0.005660620983690023, 0.002357189077883959, -0.010785254649817944, 0.027027325704693794, -0.03335706889629364, 0.018315283581614494, 0.03895010054111481, -0.04024186357855797, -0.05862148851156235, -0.07299048453569412, 0.018206605687737465, 0.06064707040786743, -0.015626151114702225, -0.018568774685263634, -0.07160684466362, -0.21388432383537292, -0.0037376703694462776, -0.07521731406450272, 0.0077966973185539246, -0.05121185630559921, 0.0014279839815571904, -0.05207530036568642, -0.018669215962290764, 0.010327884927392006, -0.03147254139184952, 0.09738913923501968, 0.026906410232186317, -0.046391017735004425, -0.013464264571666718, -0.03294067829847336, -0.08040300011634827, -0.04723498597741127, -0.042630769312381744, -0.025009239092469215, 0.03391984850168228, -0.002122248988598585, -0.03790838643908501, -0.03180508688092232, 0.01949971355497837, 0.010122771374881268, 0.051676731556653976, 0.0024120472371578217, 0.05023922398686409, 0.052908506244421005, 0.04200582578778267, 0.011493614874780178, -0.003843532409518957, -0.009896693751215935, -0.21035978198051453, 0.08360381424427032, 0.07414247840642929, 0.036418359726667404, -0.007101650349795818, -0.004181294701993465, 0.02652379497885704, -0.018551304936408997, -0.027239834889769554, 0.02113186940550804, -0.0079935472458601, 0.040186602622270584, -0.01152308750897646, -0.02223208360373974, -0.07537642866373062, -0.04616042226552963, -0.00664724363014102, 0.038156963884830475, -0.030071187764406204, -0.008217349648475647, -0.018845384940505028, 0.012877597473561764, -0.020633868873119354, 0.010081459768116474, 0.029461365193128586, 0.0043737818486988544, 0.07347084581851959, 0.029320519417524338, -0.06302041560411453, -0.022516321390867233, -0.004830969963222742, 0.07377896457910538, -0.05266900360584259, 0.012998322024941444, 0.06358218938112259, 0.024431826546788216, 0.05580923333764076, 0.21456238627433777, -0.0450860895216465, 0.038543663918972015, 0.05571330338716507, 0.021763725206255913, 0.028746463358402252, -0.06004835292696953, -0.050774458795785904, -0.009023521095514297, -0.007890340872108936, -0.0037973644211888313, -0.013347444124519825, 0.016354819759726524, 0.017025789245963097, -0.06669063121080399, 0.07578514516353607, -0.011696859262883663, -0.0040413751266896725, -0.007519607897847891, -0.0433000773191452, 0.019318170845508575, 0.030885666608810425, 0.01833305135369301, 0.06253446638584137, -0.018963640555739403, 0.04461768642067909, -0.008763670921325684, 0.07783496379852295, 0.11547507345676422, 0.005795031785964966, 0.04324275255203247, 0.0550587959587574, -0.032469071447849274, -0.06968732178211212, -0.02073279768228531, 0.004809051286429167, 0.012925920076668262, 0.018642451614141464, -0.0126267084851861, 0.011707136407494545, -0.021283278241753578, -0.014762034639716148, -0.06580939143896103, 0.01738089509308338, -0.1204753965139389, 0.00607581902295351, 0.15881717205047607, -0.04830552637577057, 0.045559342950582504, -0.05582395941019058, -0.0034295341465622187, -0.04485661908984184, 0.06537620723247528, -0.031893290579319, -0.0361630842089653, 0.022497689351439476, 0.03835410252213478, 0.02521045133471489, 0.09530207514762878, -0.04089537635445595, 0.04300328344106674, -0.021511120721697807, -0.0020799911580979824, 0.005408618599176407, 0.07877356559038162, 0.004042138811200857, -0.08785119652748108, 0.010658043436706066, 0.03649265319108963, 0.022046374157071114, 0.0023790125269442797, 0.0069837565533816814, 0.03555089235305786, -0.060000985860824585, -0.01930321753025055, 0.10075096040964127, 0.008223902434110641, -0.020665770396590233, 0.005271465517580509, 0.011536496691405773, 0.025748122483491898, 0.009297367185354233, 0.0005148012423887849, -0.009264705702662468, 0.002609544899314642, 0.05830679088830948, -0.06841374933719635, -0.016176078468561172, -0.03529034182429314, 0.0037357225082814693, 0.03315757215023041, -0.05582335218787193, -0.03713912516832352, -0.01853322796523571, -0.037150733172893524, -0.020859291777014732, -0.0551542304456234, 0.03134501352906227, -0.01879686489701271, 0.011258812621235847, -0.038614168763160706, 0.07592958956956863, 0.005070086568593979, -0.024222450330853462, 0.044724080711603165, 0.002751254476606846, 0.0244485791772604, -0.047260358929634094, -0.009995590895414352, 0.04295872151851654, -0.004237688146531582, -0.048539936542510986, -0.019095784053206444, 0.049019474536180496, 0.01074924971908331, -0.04568079486489296, 0.0005362085066735744, -0.02860921621322632, -0.004692069720476866, 0.013073287904262543, 0.03390929847955704, -0.0018482477171346545, -0.11528021097183228, -0.07205503433942795, -0.2609308362007141, 0.028236625716090202, 0.03538217768073082, 0.015411113388836384, -0.005568532273173332, -0.03598535805940628, 0.023434313014149666, -0.025202525779604912, 0.02714751660823822, 0.0425163134932518, 0.09611106663942337, 0.004527772311121225, 0.003128448501229286, -0.05033564567565918, -0.02754252590239048, 0.05121256411075592, 0.02560143917798996, -0.0016415850259363651, -0.01244269497692585, 0.014403160661458969, -0.05846996605396271, 0.017396438866853714, -0.016384264454245567, -0.04629482328891754, 0.05118614435195923, -0.0004520583024714142, 0.19040557742118835, 0.06883503496646881, 0.04356231540441513, -0.057463545352220535, 0.032262545078992844, 0.0026327113155275583, -0.019079316407442093, -0.07309984415769577, 0.004670063965022564, 0.06099524721503258, 0.017372136935591698, 0.0664512887597084, 0.003307084087282419, -0.024930592626333237, -0.04438469558954239, 0.024079758673906326, -0.018845785409212112, -0.08256415277719498, 0.03090566396713257, -0.040633004158735275, -0.0032525681890547276, 0.015498911030590534, -0.04069797322154045, 0.018383637070655823, 0.02474874071776867, -0.01501418650150299, 0.03226364031434059, -0.016573859378695488, 0.02977326326072216, -0.0059296488761901855, -0.07291024923324585, 0.06389116495847702, -0.02946031466126442, 0.030000466853380203, -0.0029310579411685467, -0.008156813681125641, 0.003994529601186514, 0.01266103982925415, 0.026074593886733055, -0.0043271007016301155, -0.019360044971108437, -0.016258716583251953, 0.03192872554063797, -0.03309744969010353, -0.02359052188694477, 0.08567699044942856, -0.02785586379468441, 0.028279272839426994, 0.015531026758253574, 0.053077731281518936, 0.00653602322563529, -0.05219651013612747, 0.01102024782449007, -0.03389526158571243, 0.07001586258411407, -0.014330893754959106, 0.04242609441280365, 0.035909730941057205, 0.06700235605239868, 0.013609602116048336, 0.014729555696249008, 0.012846500612795353, 0.005324309226125479, -0.062092769891023636, -0.02862788364291191, -0.0209607295691967, -0.050782475620508194, -0.04061027243733406, 0.041350364685058594, 0.03165383264422417, -0.2851736545562744, 0.02508378215134144, -0.022947989404201508, -0.014196041971445084, -0.025182047858834267, -0.008790180087089539, 0.04395890235900879, 0.0520467646420002, -0.04146914929151535, 0.03594600781798363, -0.04764173552393913, 0.02115243300795555, -0.00623395387083292, -0.02026023156940937, 0.02342906780540943, 0.0644511878490448, 0.057689812034368515, -0.03512464091181755, 0.011060172691941261, -0.037215977907180786, 0.08184734731912613, 0.04849923774600029, 0.23350144922733307, 0.0009995505679398775, 0.01947200670838356, 0.04680938273668289, -0.026351045817136765, 0.05248141288757324, 0.05269423872232437, 0.0109977126121521, 0.0070192827843129635, 0.0009345778962597251, 0.08101967722177505, 0.014557135291397572, 0.025319568812847137, 0.024422602728009224, -0.03413441777229309, -0.01417576801031828, 0.03118600882589817, -0.04905695468187332, -0.023356907069683075, 0.020261524245142937, -0.017751527950167656, -0.03415282070636749, 0.09653739631175995, -0.02611513063311577, -0.04199165478348732, -0.12073668837547302, 0.004100121557712555, -0.01322132721543312, -0.07170280069112778, 0.007489045150578022, -0.024331383407115936, -0.005967460107058287, 0.011252205818891525, 0.020840931683778763, -0.02766258455812931, -0.0328361876308918, -0.012374832294881344, -0.019798042252659798, 0.012850305065512657, -0.06701759994029999, 0.024587515741586685, 0.005662416107952595, 0.016627464443445206 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
## Create a tumbling window query A tumbling window is a fixed-size window that moves forward in time at regular intervals. In Atlas Stream Processing, you use the [$tumblingWindow operator. In this example, let’s use the operator to compute the average watts over one-minute intervals. Refer back to the schema from the sample stream solar data. To create a tumbling window, let’s create a variable and define our tumbling window stage. ```javascript var Twindow= { $tumblingWindow: { interval: { size: NumberInt(1), unit: "minute" }, pipeline: { $group: { _id: "$device_id", max: { $max: "$obs.watts" }, avg: { $avg: "$obs.watts" } } } ] } } ```
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.0490262396633625, -0.0163712240755558, 0.03372541069984436, 0.010498758405447006, 0.01721784844994545, -0.0047952551394701, 0.023109519854187965, -0.020730765536427498, 0.03215262293815613, -0.023619646206498146, -0.02630598656833172, -0.046467944979667664, -0.0013564852997660637, -0.0001848469109972939, -0.007398129440844059, 0.013882238417863846, -0.0046544685028493404, 0.03816676884889603, -0.052643030881881714, 0.031185327097773552, 0.029037363827228546, -0.047051962465047836, -0.05904969945549965, -0.08074292540550232, 0.015221087262034416, 0.027667904272675514, -0.06185847893357277, -0.040584925562143326, -0.04355428367853165, -0.2185525894165039, 0.00924429576843977, -0.05779353901743889, 0.016981516033411026, -0.02169944904744625, -0.008418159559369087, -0.025726336985826492, -0.030057698488235474, 0.051511313766241074, -0.01857987977564335, 0.06484116613864899, 0.049526385962963104, 0.006159199867397547, -0.012652268633246422, -0.06276039034128189, -0.02475510723888874, -0.06075235828757286, -0.03433086350560188, 0.016503160819411278, -0.015546901151537895, 0.017847081646323204, -0.025900114327669144, -0.09323696047067642, 0.02576719969511032, 0.00642544636502862, 0.04243052005767822, 0.026265328750014305, 0.03713986650109291, 0.0391518734395504, 0.03902764245867729, 0.022986149415373802, 0.029706021770834923, -0.0013599226949736476, -0.19249138236045837, 0.05623488500714302, 0.07297457754611969, 0.03504634276032448, -0.01112608052790165, -0.016842998564243317, 0.019237812608480453, 0.0022176806814968586, -0.011155784130096436, 0.004682981874793768, -0.0028606904670596123, 0.03933630511164665, 0.007156067062169313, 0.0013568897265940905, -0.03340797871351242, -0.027035484090447426, -0.0037385779432952404, 0.04101463407278061, 0.006431965157389641, -0.025447417050600052, -0.018904611468315125, 0.0046233986504375935, -0.02805105596780777, -0.015459952875971794, 0.04684723913669586, -0.015205273404717445, 0.06354545056819916, -0.0010693962685763836, -0.030205655843019485, -0.02883067913353443, -0.02405492402613163, 0.05076022446155548, -0.02052656002342701, 0.009729241020977497, 0.07914702594280243, 0.035422954708337784, 0.02263827435672283, 0.22148211300373077, -0.02142920531332493, 0.03580446541309357, 0.06175169721245766, -0.04333437606692314, 0.03640919551253319, -0.0564790740609169, -0.0440702922642231, -0.030168814584612846, -0.024398060515522957, -0.001676193904131651, 0.0035220005083829165, 0.009055674076080322, 0.030781997367739677, -0.06382052600383759, 0.04944230988621712, -0.0017841669032350183, 0.001410609926097095, 0.00981665775179863, -0.027280231937766075, 0.011421672068536282, -0.000770670420024544, 0.029792727902531624, 0.06874711066484451, -0.014251789078116417, 0.052088163793087006, -0.03995085880160332, 0.05188894644379616, 0.1345282942056656, -0.019599035382270813, 0.03258982300758362, 0.05475132539868355, -0.048839569091796875, -0.03307795524597168, 0.007128467317670584, 0.024372750893235207, -0.005774487275630236, 0.011896256357431412, 0.00006124897481640801, -0.00400915089994669, 0.007740797474980354, -0.04063234478235245, -0.057587772607803345, 0.02411874197423458, -0.1533050835132599, -0.004222416784614325, 0.1678590625524521, -0.043990358710289, 0.028584344312548637, -0.05228079482913017, -0.03533430024981499, -0.026992321014404297, 0.026218567043542862, -0.049382880330085754, -0.026082158088684082, 0.00925647746771574, 0.014855262823402882, 0.03481650352478027, 0.10775652527809143, -0.05843339487910271, -0.0027265993412584066, -0.029273441061377525, -0.020542606711387634, -0.02091447450220585, 0.0652802437543869, -0.0009723402326926589, -0.11138918995857239, -0.02006545290350914, 0.045818082988262177, 0.009817696176469326, 0.015328554436564445, 0.008055257610976696, 0.02500695362687111, -0.04289739206433296, 0.0034493792336434126, 0.0976589173078537, 0.041005901992321014, -0.04439864680171013, 0.007620286662131548, 0.005742225330322981, 0.000834851642139256, 0.015461326576769352, -0.0475059375166893, 0.002994860289618373, 0.02544897235929966, 0.047152433544397354, -0.04960571229457855, -0.010890555568039417, -0.046528857201337814, 0.008377333171665668, 0.05604109913110733, -0.0573410838842392, -0.03634023293852806, 0.007927018217742443, -0.02818831242620945, -0.010710172355175018, -0.03875823691487312, 0.017050961032509804, -0.025982487946748734, 0.024797922000288963, -0.013243604451417923, 0.08073991537094116, -0.002373955212533474, -0.004586556926369667, 0.0614648200571537, 0.03229426592588425, 0.04863128438591957, -0.052538447082042694, -0.013549252413213253, 0.03410017862915993, 0.010847887024283409, -0.02851754240691662, -0.006161097437143326, 0.02117462456226349, -0.0023320296313613653, -0.02609030343592167, 0.014408653602004051, -0.023690760135650635, 0.020137883722782135, -0.005967662204056978, 0.03755582869052887, 0.015347633510828018, -0.086224265396595, -0.07331754267215729, -0.26051220297813416, 0.0038605635054409504, 0.022208618000149727, 0.032176487147808075, 0.010616786777973175, -0.043266307562589645, 0.044282831251621246, -0.04974725469946861, 0.01850326545536518, 0.058998700231313705, 0.05977947637438774, -0.0021544683258980513, -0.008071677759289742, -0.0420164093375206, 0.0001945667463587597, 0.06802638620138168, 0.01502684224396944, 0.008411386050283909, -0.028432749211788177, -0.02997608669102192, -0.009940453805029392, 0.036959752440452576, -0.035019755363464355, -0.09167509526014328, 0.041191890835762024, 0.002500366186723113, 0.18861904740333557, 0.035693198442459106, 0.0204207431524992, -0.05879358947277069, 0.0846133828163147, -0.006350420415401459, -0.01673760637640953, -0.0564635768532753, 0.009866644628345966, 0.050638455897569656, 0.025486452504992485, 0.05459421128034592, -0.044066209346055984, -0.03268852084875107, -0.05355823412537575, 0.03721814230084419, -0.022436998784542084, -0.09132276475429535, -0.0023148509208112955, -0.023459238931536674, -0.023577479645609856, 0.00152332813013345, -0.0472075417637825, 0.02397232875227928, -0.00505288690328598, -0.029549209401011467, 0.03793672099709511, -0.013222127221524715, 0.008622757159173489, -0.008980619721114635, -0.05192472040653229, 0.07548730820417404, -0.023779258131980896, 0.006165811326354742, 0.01691761612892151, -0.023103822022676468, 0.007781910710036755, 0.009588378481566906, 0.04835286736488342, -0.004099253565073013, 0.003765423782169819, -0.036384664475917816, 0.033782683312892914, -0.036620281636714935, -0.04076157137751579, 0.07172226160764694, -0.04989444464445114, 0.025508468970656395, 0.01457150373607874, 0.044739026576280594, -0.0022511431016027927, -0.04866694658994675, 0.009285001084208488, -0.00938812829554081, 0.050376083701848984, -0.029912125319242477, 0.05894160643219948, 0.02943045273423195, 0.04973398894071579, 0.009055143222212791, 0.014887851662933826, -0.0014029827434569597, -0.0037989425472915173, -0.03311324864625931, -0.02570672519505024, -0.002900926396250725, -0.03265225514769554, -0.053869616240262985, 0.008106718771159649, 0.015083381906151772, -0.3103196918964386, 0.03209793567657471, 0.0013483988586813211, -0.013563759624958038, -0.03611486032605171, -0.009409555234014988, 0.035144612193107605, 0.030255571007728577, -0.006749877706170082, 0.027225855737924576, -0.03332897648215294, 0.049654521048069, 0.013214578852057457, -0.00003007004124810919, 0.052331116050481796, 0.04301495850086212, 0.03911794349551201, -0.03255045413970947, 0.02664300613105297, -0.033270712941884995, 0.09265675395727158, 0.0374862402677536, 0.2579115033149719, -0.0033659024629741907, 0.014333521015942097, 0.07084128260612488, -0.024798601865768433, 0.004506258759647608, 0.06748882681131363, -0.0023955872748047113, 0.01812674291431904, 0.021138101816177368, 0.11068233847618103, -0.03786419704556465, 0.06616748124361038, 0.006279459688812494, -0.034262530505657196, 0.040706586092710495, 0.037098273634910583, -0.0588722825050354, -0.007319910917431116, 0.020329967141151428, 0.022895578294992447, 0.0036371827591210604, 0.10802951455116272, -0.036022480577230453, 0.002309086499735713, -0.11053809523582458, -0.009442674927413464, 0.007236828561872244, -0.0705854520201683, 0.005191849544644356, -0.01216968335211277, 0.0051745823584496975, -0.002463095122948289, 0.029707029461860657, -0.025488615036010742, -0.033077746629714966, -0.027127724140882492, -0.015208722092211246, 0.009533078409731388, -0.09023652225732803, -0.005846064537763596, 0.005425616167485714, 0.008265677839517593 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
We are calculating the maximum value and average over the span of one-minute, non-overlapping intervals. Let’s use the `.process` command to run the streaming query in the foreground and view our results in the console. ``` sp.process([solarstream,Twindow]) ``` Here is an example output of the statement:
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.08582590520381927, -0.017711130902171135, 0.02370045706629753, -0.038152217864990234, 0.02320169284939766, -0.031578607857227325, 0.04338984936475754, -0.008935372345149517, 0.05619140341877937, 0.002810732927173376, 0.029374748468399048, -0.0434701107442379, -0.013165724463760853, 0.022194497287273407, -0.022225651890039444, 0.0053441813215613365, -0.015731502324342728, 0.0448758639395237, -0.04676254093647003, 0.02967538684606552, 0.026641283184289932, -0.042248062789440155, -0.04229791462421417, -0.08300010114908218, 0.04214802756905556, 0.0510377362370491, -0.058078210800886154, -0.06346553564071655, -0.033689625561237335, -0.22918540239334106, -0.019038472324609756, -0.0907943844795227, 0.0423610620200634, -0.05140057951211929, -0.003749461844563484, -0.06027694419026375, -0.04356667771935463, -0.0018726924899965525, -0.04935096204280853, 0.04580244421958923, 0.0035277381539344788, -0.004397829528898001, -0.056825146079063416, -0.036119334399700165, -0.07261137664318085, -0.06515786051750183, -0.04975409805774689, -0.05371512100100517, 0.005187481641769409, 0.020284904167056084, -0.023021508008241653, -0.024245668202638626, 0.036827635020017624, -0.010507917031645775, 0.06673801690340042, 0.029907891526818275, 0.04353807494044304, 0.022056587040424347, 0.026898644864559174, -0.0017267662333324552, -0.011572507210075855, -0.007455018348991871, -0.20430578291416168, 0.0727086216211319, 0.05285562947392464, 0.03096744976937771, -0.02578509785234928, -0.038286179304122925, -0.018202371895313263, 0.022944089025259018, -0.04578268900513649, 0.010705049149692059, 0.020368700847029686, 0.04525666683912277, 0.031040305271744728, -0.026930831372737885, -0.04689490422606468, -0.022850869223475456, 0.01786132901906967, 0.03819974511861801, -0.018504824489355087, -0.042770713567733765, 0.001791581860743463, -0.0016650640172883868, -0.007668918464332819, 0.008325609378516674, 0.021976863965392113, 0.005028232932090759, 0.07482588291168213, 0.03492215275764465, -0.03367195278406143, -0.029069337993860245, -0.022885311394929886, 0.030354401096701622, -0.03124048374593258, -0.022957051172852516, 0.07427762448787689, 0.01183135062456131, 0.034656379371881485, 0.199640691280365, -0.012634268030524254, 0.005066154059022665, 0.026114949956536293, -0.0038494230248034, 0.0544169656932354, -0.009328503161668777, -0.044408731162548065, 0.01487706508487463, 0.017074039205908775, 0.005091434344649315, -0.01644212007522583, -0.020946985110640526, 0.026351485401391983, -0.06373278796672821, 0.042390283197164536, 0.056229814887046814, 0.03260817006230354, -0.0063226786442101, -0.013837948441505432, -0.0012808468891307712, 0.0019403265323489904, 0.02462388575077057, 0.047317951917648315, -0.03708204627037048, 0.05769572779536247, 0.009332503192126751, 0.0980273112654686, 0.132686048746109, -0.008891369216144085, 0.01824682019650936, 0.08039046078920364, -0.04790450632572174, -0.0858151838183403, -0.0156647190451622, -0.011965232901275158, 0.009881731122732162, 0.03680334612727165, 0.0009210889111272991, 0.018455328419804573, -0.03509475290775299, -0.026076726615428925, -0.051270220428705215, 0.02046561986207962, -0.1133355125784874, 0.010405046865344048, 0.16416074335575104, -0.017961958423256874, 0.03798065334558487, -0.08174660801887512, -0.02354217879474163, -0.04003812372684479, 0.043671295046806335, -0.04384898766875267, -0.07062824070453644, 0.0019256157102063298, 0.024043753743171692, 0.021556157618761063, 0.052091315388679504, -0.03205452486872673, 0.023119138553738594, -0.05071432515978813, -0.007871825248003006, -0.006613845005631447, 0.10347846150398254, 0.018721457570791245, -0.05262763425707817, 0.009721703827381134, -0.005896392744034529, -0.014014202170073986, 0.004382740240544081, 0.02032630331814289, 0.0056137815117836, -0.017537835985422134, -0.012200913392007351, 0.07446540147066116, -0.016041936352849007, -0.03957925736904144, -0.003191441297531128, 0.029327791184186935, 0.04961451515555382, 0.07687852531671524, -0.013445423915982246, 0.0015036244876682758, 0.009294462390244007, 0.07561805099248886, -0.0672888457775116, -0.012985100969672203, -0.01636018604040146, 0.025566060096025467, 0.05326810106635094, -0.04492112621665001, -0.023614244535565376, -0.011319234035909176, -0.03353572264313698, -0.030923882499337196, -0.05843353271484375, 0.02561774104833603, -0.02268081344664097, 0.02616804651916027, -0.013138914480805397, 0.09780213981866837, 0.011135430075228214, -0.018567021936178207, 0.028871189802885056, 0.024628259241580963, 0.0568537563085556, -0.07879065722227097, -0.009480142965912819, 0.07935510575771332, 0.025094768032431602, -0.04595956206321716, -0.018121303990483284, 0.05949723720550537, 0.018208177760243416, -0.0346112884581089, 0.02254573069512844, 0.007238166872411966, 0.05335843935608864, 0.023864952847361565, 0.06303276121616364, 0.01925092563033104, -0.07105892151594162, -0.08015716820955276, -0.26647230982780457, 0.04891567304730415, 0.023635832592844963, 0.005446959752589464, 0.03678830340504646, -0.04595102369785309, 0.043811947107315063, -0.07383307069540024, -0.010660413652658463, 0.05333452671766281, 0.08569923043251038, -0.025514664128422737, 0.00623704819008708, -0.04242192953824997, -0.010562444105744362, 0.04795214906334877, 0.0141417495906353, 0.014749063178896904, -0.022479692474007607, 0.029614141210913658, -0.054011620581150055, 0.027700403705239296, -0.028918152675032616, -0.04247830808162689, 0.027149679139256477, -0.005517641082406044, 0.20307238399982452, 0.04394135624170303, 0.07492078095674515, -0.05628747493028641, 0.01464810036122799, 0.007573598995804787, -0.0012479143915697932, -0.050270579755306244, -0.003686287207528949, 0.04613243415951729, 0.033550918102264404, 0.028302527964115143, -0.005983067210763693, -0.008108201436698437, -0.08104954659938812, 0.03265523910522461, -0.006618494167923927, -0.08583036065101624, -0.0182542335242033, -0.031640153378248215, -0.00397026352584362, 0.01591305434703827, -0.03012283518910408, 0.03570088371634483, 0.017582906410098076, -0.02604515291750431, 0.04211849719285965, -0.012503397651016712, 0.016297174617648125, -0.012200215831398964, -0.07353828102350235, 0.06834525614976883, -0.017010265961289406, 0.025203455239534378, 0.008553743362426758, -0.03848835080862045, 0.029375392943620682, 0.006417193915694952, 0.03995444253087044, 0.0215387474745512, 0.019632577896118164, -0.012284772470593452, 0.02610424906015396, -0.016162043437361717, -0.025412283837795258, 0.08687065541744232, -0.031450603157281876, 0.0201112013310194, 0.020386461168527603, 0.03837268054485321, 0.029975416138768196, -0.029662560671567917, -0.01915716379880905, -0.0246394332498312, 0.05221080034971237, -0.07155443727970123, 0.025500493124127388, 0.02557498589158058, 0.021810205653309822, -0.007960782386362553, 0.04297708347439766, 0.014191942289471626, 0.01711091212928295, -0.03741050884127617, -0.03642697632312775, -0.03660908713936806, -0.03387543186545372, -0.025632843375205994, -0.011356975883245468, -0.0019514613086357713, -0.27509891986846924, 0.02637273631989956, -0.028814077377319336, -0.015186488628387451, 0.0049423398450016975, -0.011417683213949203, 0.038487162441015244, 0.05679458752274513, -0.07242482155561447, 0.027660397812724113, -0.02919604629278183, 0.028167376294732094, 0.0006591254496015608, 0.006589739583432674, 0.028895823284983635, 0.05152934417128563, 0.01588255725800991, -0.024324271827936172, 0.040318939834833145, -0.04416482523083687, 0.09089240431785583, 0.05516933649778366, 0.18589262664318085, -0.030870286747813225, 0.03478667140007019, 0.06544450670480728, -0.052726004272699356, 0.019908979535102844, 0.04966204985976219, -0.023128068074584007, 0.006802170537412167, 0.04284582659602165, 0.08894528448581696, -0.016668103635311127, 0.04635096341371536, 0.04596151411533356, -0.018090028315782547, 0.04039498791098595, 0.03937670961022377, -0.03400669991970062, -0.010323762893676758, -0.0326630137860775, 0.0035676960833370686, -0.04715907573699951, 0.094629667699337, -0.018107742071151733, -0.03625389561057091, -0.08675460517406464, 0.015225937590003014, -0.006821095012128353, -0.11806949973106384, 0.007046933751553297, 0.0019910146947950125, 0.0005936318775638938, 0.020661408081650734, 0.01702226512134075, -0.016251858323812485, -0.021733662113547325, -0.043964240700006485, -0.014882223680615425, 0.012298918329179287, -0.07308682799339294, 0.04343295097351074, 0.020508283749222755, -0.011415209621191025 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
Here is an example output of the statement: ```json { _id: 'device_4', max: 236, avg: 95, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T13:59:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T14:00:00.000Z") } } { _id: 'device_2', max: 211, avg: 117.25, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T13:59:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T14:00:00.000Z") } } ``` ## Exploring the window operator pipeline
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.06474524736404419, 0.018204856663942337, 0.04410383105278015, -0.023478558287024498, 0.05389182269573212, -0.017676012590527534, 0.035181980580091476, 0.004596846178174019, 0.0043223244138062, 0.0188174769282341, -0.03164099529385567, -0.05980885401368141, -0.0036178804002702236, 0.011883306317031384, 0.009274542331695557, -0.008710700087249279, -0.007656954228878021, 0.001476413570344448, -0.07559259235858917, -0.004502665717154741, 0.06233580410480499, -0.019501904025673866, -0.04272213578224182, -0.09584194421768188, 0.05348818749189377, 0.07749461382627487, -0.01055697351694107, 0.009390957653522491, -0.049874380230903625, -0.2132711410522461, -0.029242679476737976, -0.06633546948432922, 0.035737503319978714, -0.0368313193321228, -0.01278630644083023, -0.037103526294231415, -0.028753288090229034, 0.06372366100549698, -0.03210025653243065, 0.09633463621139526, 0.043233491480350494, -0.008289089426398277, -0.02364731952548027, -0.043114203959703445, -0.08219891786575317, -0.08669787645339966, -0.06723390519618988, -0.0058288839645683765, -0.02372325211763382, 0.012051662430167198, -0.030567176640033722, 0.001387280412018299, -0.0077681648544967175, -0.004232863429933786, 0.04699084162712097, 0.04323391988873482, 0.03876812383532524, 0.052194710820913315, 0.011179173365235329, -0.012170967645943165, 0.0059282900765538216, -0.011343052610754967, -0.17121419310569763, 0.08158392459154129, 0.05597873032093048, 0.05042248219251633, -0.0034315281081944704, -0.027748072519898415, 0.002690910827368498, 0.011260890401899815, -0.04532346501946449, 0.017871160060167313, -0.010815548710525036, 0.02032466232776642, 0.03388676419854164, -0.03557517006993294, -0.029046963900327682, -0.015171847306191921, 0.04029448702931404, 0.03343958035111427, -0.016759783029556274, -0.03776702284812927, -0.022590598091483116, -0.009337536059319973, -0.010868256911635399, -0.0349993072450161, 0.017688287422060966, -0.017722580581903458, 0.08852281421422958, 0.015229747630655766, -0.06917179375886917, -0.03991680219769478, -0.012371859513223171, 0.05617513507604599, -0.045438095927238464, 0.02570505440235138, 0.0420043058693409, 0.03806406259536743, 0.005134624429047108, 0.18765932321548462, -0.0496821291744709, 0.007122505456209183, -0.016041280701756477, -0.02406412363052368, 0.06572979688644409, -0.05803404003381729, -0.047922052443027496, -0.039640627801418304, -0.014429374597966671, -0.0208201315253973, -0.0151155274361372, 0.03253437951207161, 0.03157717362046242, -0.05885668471455574, 0.05089879035949707, -0.010101143270730972, 0.016696900129318237, 0.00282121985219419, 0.009539195336401463, 0.01723010092973709, 0.007314892020076513, 0.00864480622112751, 0.00890245009213686, -0.02813059464097023, 0.017132902517914772, -0.004546471871435642, 0.044682618230581284, 0.11875316500663757, 0.01664525456726551, 0.030607514083385468, 0.03307078406214714, -0.04443966597318649, -0.03692476823925972, 0.0148759251460433, -0.02943042665719986, 0.006846191361546516, -0.00785575807094574, -0.0022274686489254236, 0.03381568565964699, 0.040279604494571686, -0.042805906385183334, -0.07096890360116959, -0.013960003852844238, -0.04213527962565422, -0.008145769126713276, 0.18347036838531494, -0.033171147108078, 0.06505954265594482, -0.015367692336440086, -0.00848429650068283, -0.04516702890396118, 0.05839010700583458, -0.03461612015962601, -0.053758349269628525, 0.015587026253342628, 0.03434596210718155, 0.031699758023023605, 0.06737896054983139, -0.0250482689589262, 0.017671607434749603, -0.011914677917957306, -0.05784408375620842, -0.02217862755060196, 0.06520348787307739, -0.0009254477918148041, -0.08766515552997589, -0.01602581888437271, 0.02798568829894066, 0.03756957873702049, -0.04624507203698158, 0.011609368957579136, 0.0212317556142807, -0.04154271259903908, -0.018184637650847435, 0.08508053421974182, 0.00046728996676392853, -0.03009050153195858, 0.01926111802458763, 0.00215925183147192, 0.018994709476828575, -0.014465047977864742, -0.032747965306043625, -0.0486886240541935, 0.034611158072948456, 0.0632849633693695, -0.04259229451417923, 0.0031105903908610344, -0.052456073462963104, 0.006563848350197077, 0.045202866196632385, -0.005096500273793936, -0.01999260112643242, -0.03694409132003784, -0.019104881212115288, -0.02533484622836113, -0.03320158272981644, 0.00883924774825573, 0.005783922038972378, 0.03200075030326843, -0.040688443928956985, 0.05431210622191429, 0.01605774275958538, -0.005944329313933849, 0.028006045147776604, -0.0074347443878650665, -0.0043902709148824215, -0.028957916423678398, -0.019665328785777092, 0.03569595888257027, 0.01975891925394535, -0.04461593180894852, 0.00009733738988870755, 0.02893364056944847, 0.009253865107893944, -0.0018266566330567002, -0.013207691721618176, -0.019040783867239952, 0.013179177418351173, 0.0424652099609375, 0.05514267086982727, -0.0037767065223306417, -0.0939590111374855, -0.07455034554004669, -0.2637895941734314, 0.010380273684859276, 0.028769124299287796, -0.007991627790033817, 0.030484413728117943, -0.04783257469534874, 0.008970214985311031, -0.03881125897169113, 0.02538367547094822, 0.04581969976425171, 0.04968336969614029, 0.0136965187266469, -0.001638169982470572, -0.019388938322663307, -0.0339757464826107, 0.07913707196712494, -0.017740271985530853, -0.019070444628596306, -0.006478400435298681, 0.04273557662963867, -0.020215239375829697, 0.018491670489311218, -0.04182643070816994, -0.08230269700288773, 0.04196663200855255, 0.0000026365837584307883, 0.20072928071022034, 0.049324408173561096, 0.03262024372816086, -0.05244839936494827, 0.08126717805862427, 0.0015140391187742352, -0.030436797067523003, -0.04828517138957977, 0.04202175512909889, 0.033563148230314255, 0.01999541185796261, 0.020640026777982712, 0.006770153995603323, -0.0052139051258563995, -0.025035494938492775, 0.05165456235408783, 0.01537581067532301, -0.06388431787490845, 0.010155546478927135, -0.06018577143549919, -0.029018118977546692, 0.02530425600707531, -0.03146246820688248, -0.02128874510526657, 0.05088943988084793, -0.005358213558793068, 0.06503065675497055, 0.005896763410419226, 0.0038225282914936543, -0.03535372391343117, -0.06132294982671738, 0.015227588824927807, -0.032618455588817596, 0.024550650268793106, 0.03387104347348213, -0.03893545642495155, 0.005398917477577925, -0.0018851227359846234, 0.019624903798103333, -0.016895119100809097, 0.04197947680950165, -0.019757909700274467, -0.0025725136511027813, -0.02501962147653103, -0.029141366481781006, 0.08923090994358063, -0.06444954127073288, 0.0242659542709589, 0.07343458384275436, 0.056203749030828476, -0.00811766553670168, -0.032948318868875504, 0.015621621161699295, -0.020350750535726547, 0.06000745669007301, -0.05255467817187309, 0.07316192984580994, 0.016720490530133247, 0.055597592145204544, 0.02424008958041668, 0.03358081728219986, 0.026869896799325943, 0.0038517022039741278, -0.06817684322595596, -0.019772926345467567, -0.016389166936278343, -0.050319138914346695, -0.07877073436975479, 0.028965143486857414, 0.006236375775188208, -0.3040154278278351, 0.05293702334165573, 0.018796972930431366, -0.016732389107346535, 0.004862876143306494, 0.013751431368291378, -0.0038724506739526987, 0.007671935483813286, -0.06987029314041138, 0.03155731037259102, -0.048349130898714066, 0.07018784433603287, -0.005102965049445629, -0.014962799847126007, -0.0068626259453594685, 0.07618265599012375, 0.047423649579286575, -0.060707204043865204, 0.02795957773923874, -0.030269183218479156, 0.041097491979599, 0.061817560344934464, 0.24355241656303406, 0.006343163084238768, 0.038747332990169525, 0.058323800563812256, -0.016794059425592422, 0.02292463928461075, 0.08724918216466904, -0.024290110915899277, 0.030711211264133453, 0.022231966257095337, 0.13180406391620636, 0.021189559251070023, 0.02319255657494068, 0.028589749708771706, -0.0748099610209465, 0.04533572122454643, 0.03483971953392029, -0.022182414308190346, -0.03360755741596222, 0.01943874917924404, 0.008376269601285458, -0.03372235596179962, 0.11141839623451233, -0.05703868716955185, -0.046773649752140045, -0.1039484515786171, 0.030318737030029297, -0.023835444822907448, -0.056957632303237915, -0.0036666335072368383, -0.011102380231022835, 0.002661607228219509, 0.044428713619709015, -0.007583643775433302, -0.014731552451848984, -0.048783160746097565, -0.028257662430405617, 0.014321047812700272, 0.00704084150493145, -0.03794190287590027, -0.0016462893690913916, 0.04459454491734505, 0.020021580159664154 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
## Exploring the window operator pipeline The pipeline that is used within a window function can include blocking stages and non-blocking stages. [Accumulator operators such as `$avg`, `$count`, `$sort`, and `$limit` can be used within blocking stages. Meaningful data returned from these operators are obtained when run over a series of data versus a single data point. This is why they are considered blocking.
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.0676313042640686, -0.021568244323134422, 0.032407741993665695, -0.030507676303386688, -0.008578830398619175, 0.0313553623855114, 0.04627580568194389, 0.010022683069109917, 0.0404842309653759, -0.0068512349389493465, -0.03195171430706978, -0.02525431290268898, 0.018437296152114868, 0.005771163385361433, -0.047799039632081985, -0.0020865295082330704, -0.005729084834456444, 0.05589750409126282, -0.07099448889493942, -0.03846060484647751, 0.030238820239901543, -0.013687588274478912, -0.06360165774822235, -0.08695156127214432, 0.02244965173304081, 0.04327637329697609, -0.07982304692268372, -0.030322860926389694, -0.0008189157815650105, -0.1916479915380478, -0.027964841574430466, -0.05825028941035271, 0.036593567579984665, -0.016465261578559875, -0.01072376687079668, -0.04733262211084366, -0.018144872039556503, 0.0807756781578064, -0.016472341492772102, 0.049997590482234955, 0.049530018121004105, -0.0006907778442837298, -0.041588544845581055, -0.03911864385008812, -0.023224353790283203, -0.06405363976955414, -0.07896149158477783, -0.03268393874168396, -0.006471241824328899, 0.0009016694384627044, -0.029238497838377953, 0.012642922811210155, 0.016255078837275505, 0.024300074204802513, 0.022694023326039314, 0.016862357035279274, 0.03361562639474869, 0.03619720786809921, 0.036856673657894135, 0.0397447794675827, 0.03272435441613197, 0.020362170413136482, -0.17288139462471008, 0.06724754720926285, 0.048179518431425095, 0.017189640551805496, -0.02385888248682022, -0.034820377826690674, 0.018468262627720833, 0.03936828672885895, -0.04257667064666748, -0.014161139726638794, -0.026645110920071602, 0.06025465577840805, 0.04126088693737984, -0.04595855623483658, -0.024170391261577606, -0.007870698347687721, 0.00510007468983531, 0.0368678905069828, -0.0098593570291996, -0.07618080079555511, -0.029365157708525658, -0.018794026225805283, -0.045860905200242996, -0.020786283537745476, 0.05173961818218231, -0.038781896233558655, 0.04483220353722572, 0.026663094758987427, -0.034804362803697586, 0.005747146438807249, -0.01008701790124178, 0.025599833577871323, -0.03372247889637947, -0.01862240768969059, 0.039907053112983704, 0.01235965732485056, -0.041451968252658844, 0.21018891036510468, -0.017579074949026108, 0.01665331795811653, 0.01083303615450859, -0.02014162577688694, 0.01994132250547409, -0.01808053068816662, -0.0344882495701313, -0.04669004678726196, -0.03265878185629845, -0.003580852411687374, 0.027750588953495026, -0.02336406148970127, 0.0756814256310463, -0.0732470452785492, 0.02992563135921955, -0.03224492073059082, 0.007990043610334396, -0.005351015366613865, 0.02645404450595379, 0.03902776911854744, -0.028014782816171646, -0.0034862703178077936, 0.019224751740694046, -0.012128490954637527, 0.044705137610435486, -0.0452628955245018, 0.05261952057480812, 0.12355084717273712, 0.022733064368367195, 0.0558897964656353, 0.029428478330373764, -0.06978283822536469, -0.02404608204960823, 0.008638974279165268, -0.02266477607190609, 0.009345798753201962, 0.022395921871066093, 0.015375847928225994, 0.03755638748407364, -0.03968139365315437, -0.018053650856018066, -0.02213864214718342, 0.04248538240790367, -0.11620599776506424, -0.021727243438363075, 0.1526978313922882, -0.027552975341677666, 0.06418038159608841, -0.04627224802970886, -0.00534351821988821, 0.009548568166792393, 0.03839591145515442, -0.02628057450056076, -0.036526668816804886, -0.010607072152197361, -0.008629119023680687, -0.007992771454155445, 0.09882275760173798, -0.05401979759335518, 0.007420232519507408, -0.036594606935977936, -0.04068995639681816, -0.03440477326512337, 0.09204963594675064, 0.0036800706293433905, -0.028621172532439232, -0.04098550230264664, 0.033707648515701294, 0.016314640641212463, -0.022899363189935684, 0.032576724886894226, 0.028850531205534935, -0.059937555342912674, -0.020245937630534172, 0.03965359926223755, 0.0029425490647554398, -0.09576679021120071, -0.004265961237251759, -0.011362581513822079, 0.03435388207435608, 0.0314192920923233, -0.03709377348423004, -0.024025555700063705, -0.007908893749117851, 0.07028466463088989, -0.046753693372011185, -0.016161693260073662, -0.03691014647483826, 0.005083872936666012, 0.04715730622410774, -0.05626828223466873, 0.0015835550148040056, -0.04291766881942749, -0.013927850872278214, -0.06345570832490921, -0.06328309327363968, -0.013361282646656036, -0.011641453951597214, -0.005789013579487801, -0.008167995139956474, 0.0550185851752758, 0.03243958204984665, -0.012625263072550297, 0.02890114113688469, -0.020803166553378105, 0.023968005552887917, -0.0076398830860853195, -0.03565286844968796, 0.05025206878781319, 0.0244356170296669, -0.04384752735495567, -0.01341632753610611, 0.014045544900000095, -0.009603836573660374, -0.03343362361192703, -0.004642894491553307, 0.0024741000961512327, 0.02569536678493023, 0.014691710472106934, 0.054483115673065186, 0.01596003584563732, -0.01038124319165945, -0.04979369789361954, -0.28258562088012695, -0.012931057251989841, 0.017178811132907867, 0.016716793179512024, 0.037018440663814545, -0.015489998273551464, 0.033322591334581375, -0.01344717014580965, -0.0292108915746212, 0.06757239997386932, 0.04148193076252937, -0.023076629266142845, -0.054233986884355545, 0.0028106586541980505, -0.0025569687131792307, 0.03616010397672653, -0.0016635565552860498, -0.01355364266782999, -0.06320550292730331, 0.004617106169462204, -0.032265279442071915, 0.025292491540312767, -0.055097486823797226, -0.08859388530254364, 0.05640164017677307, -0.006867790594696999, 0.1767689287662506, 0.01987251080572605, 0.06545045226812363, 0.001250593108125031, 0.06454695016145706, 0.007518804632127285, -0.04888192191720009, -0.08274475485086441, 0.05350517854094505, 0.048192981630563736, 0.026338273659348488, 0.05529368296265602, 0.01954943872988224, -0.0009477598359808326, -0.028258714824914932, 0.034743644297122955, 0.004041173495352268, -0.04437927529215813, 0.012503855861723423, -0.028212036937475204, -0.02092883177101612, 0.044293418526649475, -0.039722565561532974, -0.03584910184144974, 0.024695593863725662, -0.012264898978173733, 0.04070015996694565, 0.033450059592723846, 0.009868326596915722, -0.0154917873442173, -0.035151395946741104, 0.0431305468082428, -0.01731259934604168, -0.0005521395360119641, 0.01831876114010811, -0.06167018041014671, 0.019021058455109596, -0.007354103494435549, 0.06844159960746765, 0.00925526674836874, 0.007725362665951252, -0.026012049987912178, 0.03623347729444504, -0.03680361807346344, -0.058881476521492004, 0.09307307004928589, -0.0545947402715683, -0.00618070550262928, 0.055847641080617905, 0.05532275140285492, 0.03674151003360748, -0.053258251398801804, -0.03217300772666931, -0.03445889428257942, 0.031354427337646484, -0.04245550185441971, 0.02351386845111847, -0.003205062821507454, 0.008223075419664383, -0.009098040871322155, 0.04042159020900726, -0.0017045788699761033, 0.003347154473885894, -0.03513975813984871, -0.010395514778792858, 0.02374851144850254, -0.03392595797777176, -0.04457647353410721, 0.03788428753614426, -0.0018268239218741655, -0.3222927153110504, 0.02726287767291069, 0.000404407357564196, -0.02707337960600853, 0.005218139849603176, 0.0019466379890218377, 0.027989130467176437, 0.019895251840353012, -0.05151240900158882, 0.02051461674273014, -0.012350285425782204, 0.08545558899641037, 0.0309540294110775, -0.0012270575389266014, 0.01860271394252777, 0.059035107493400574, 0.07265323400497437, -0.03033287636935711, 0.06051650643348694, -0.00318492972292006, 0.04826836660504341, 0.031030714511871338, 0.25216802954673767, -0.03425196558237076, 0.05667650327086449, 0.027340717613697052, -0.04393130540847778, 0.013348504900932312, 0.04996667802333832, -0.019962653517723083, 0.05722897872328758, 0.017964251339435577, 0.10724403709173203, -0.07167897373437881, 0.044303566217422485, 0.03076423890888691, -0.04734024032950401, 0.09789756685495377, 0.040568042546510696, -0.025963155552744865, -0.039477042853832245, 0.07292017340660095, -0.02836529351770878, -0.02921062707901001, 0.10330618172883987, -0.02348105050623417, -0.014301851391792297, -0.09153889119625092, 0.0422726608812809, 0.03718847408890724, -0.02855108678340912, 0.022324424237012863, 0.035319652408361435, 0.03217915818095207, 0.06477420032024384, 0.04944668710231781, -0.0538414865732193, 0.0009987460216507316, -0.037630077451467514, 0.020608844235539436, 0.01713959500193596, -0.04413062706589699, -0.0213279128074646, 0.021360695362091064, 0.04684429243206978 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
Non-blocking stages do not require multiple data points to be meaningful, and they include operators such as `$addFields`, `$match`, `$project`, `$set`, `$unset`, and `$unwind`, to name a few. You can use non-blocking before, after, or within the blocking stages. To illustrate this, let’s create a query that shows the average, maximum, and delta (the difference between the maximum and average). We will use a non-blocking **$match** to show only the results from device_1, calculate the tumblingWindow showing maximum and average, and then include another non-blocking `$addFields`. ``` var m= { '$match': { device_id: 'device_1' } } ```
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.08450532704591751, -0.012346778996288776, 0.03441380709409714, -0.03814255818724632, 0.022254062816500664, 0.021236564964056015, 0.0389101505279541, -0.0034526961389929056, 0.03986368700861931, 0.002080135280266404, 0.0027994918636977673, 0.0005163490423001349, 0.008730844594538212, 0.03468247875571251, -0.0571993924677372, 0.024769505485892296, -0.015336457639932632, 0.05606229230761528, -0.0449264720082283, 0.023086704313755035, 0.018982021138072014, -0.015985548496246338, -0.038301944732666016, -0.04809361323714256, 0.021272903308272362, 0.059203069657087326, -0.07628632336854935, -0.03259206935763359, -0.001670155324973166, -0.23560239374637604, -0.022038444876670837, -0.05436915531754494, -0.005753686185926199, -0.010079377330839634, 0.004911808762699366, -0.021691441535949707, -0.015976648777723312, 0.06699728965759277, -0.006627864670008421, 0.05825704336166382, 0.05061851814389229, -0.023766037076711655, -0.017330871894955635, -0.06567774713039398, -0.042030707001686096, -0.07193086296319962, -0.058545470237731934, -0.03115469589829445, 0.01778671331703663, -0.015252414159476757, -0.019743168726563454, -0.05102910101413727, 0.019803518429398537, 0.014959627762436867, 0.054665226489305496, 0.028128651902079582, 0.02471422590315342, 0.048634033650159836, 0.010026039555668831, 0.04475373029708862, 0.03802165389060974, 0.02416812628507614, -0.1532212495803833, 0.04949476197361946, 0.07938280701637268, 0.015518659725785255, -0.022282442077994347, -0.021500790491700172, 0.028647657483816147, 0.07340091466903687, 0.006385450717061758, 0.01038411445915699, 0.013804461807012558, 0.07976964116096497, 0.047751180827617645, -0.008462962694466114, -0.039203353226184845, -0.005052884109318256, -0.014366746880114079, 0.059929657727479935, -0.04879813268780708, -0.10110663622617722, -0.04321920871734619, -0.014226777479052544, -0.02698022872209549, -0.039282962679862976, 0.004436150658875704, -0.06565818190574646, -0.0011829710565507412, 0.037104565650224686, -0.025132525712251663, -0.004205142147839069, -0.03561602160334587, 0.005559681914746761, -0.05065052583813667, -0.016472814604640007, 0.005235854536294937, 0.013190580531954765, -0.014825332909822464, 0.1771315038204193, -0.03940676152706146, 0.009722284972667694, -0.001394761260598898, 0.0033485786989331245, -0.00006752136687282473, -0.05893664062023163, -0.03784060850739479, -0.05487668514251709, -0.008725381456315517, -0.008192300796508789, 0.03913954272866249, -0.02129560522735119, 0.04935194551944733, -0.07040861994028091, 0.020704111084342003, 0.014322921633720398, 0.04820957034826279, -0.008345413953065872, 0.026195328682661057, 0.015793729573488235, -0.009375084191560745, 0.0014381703222170472, 0.017798887565732002, -0.005461929365992546, 0.016883332282304764, -0.06214345991611481, 0.06039995327591896, 0.12707391381263733, 0.026823636144399643, 0.04747042804956436, 0.059710543602705, -0.06584950536489487, -0.05489835515618324, 0.018069488927721977, 0.0030753719620406628, -0.016121702268719673, 0.03925915062427521, 0.04950856417417526, 0.039878278970718384, -0.02628793939948082, -0.014593593776226044, -0.07681909203529358, 0.0299754086881876, -0.1098986491560936, -0.025009803473949432, 0.15392664074897766, -0.02350882813334465, 0.04569106549024582, -0.07650871574878693, -0.036030154675245285, -0.024586735293269157, 0.05082165077328682, -0.046036459505558014, -0.03907758370041847, -0.040936730802059174, 0.0032544289715588093, 0.0033862863201647997, 0.08554147183895111, -0.06411132961511612, -0.011981179937720299, -0.03107803873717785, -0.03383819758892059, -0.04009442403912544, 0.09726317226886749, 0.0012511059176176786, -0.060773976147174835, -0.0065691242925822735, 0.007730480749160051, 0.014305469579994678, -0.03307575732469559, 0.010996198281645775, 0.05124335363507271, -0.052636247128248215, -0.022959807887673378, 0.07630854099988937, -0.004214142914861441, -0.09386442601680756, -0.006494484841823578, -0.00757529865950346, 0.06136293336749077, 0.0038963088300079107, -0.021671811118721962, -0.037624262273311615, -0.008659402839839458, 0.034800417721271515, -0.019242532551288605, 0.006374684162437916, -0.0034028389491140842, 0.017119234427809715, 0.04404383897781372, -0.08157455921173096, -0.020497344434261322, -0.023139337077736855, 0.022897962480783463, -0.039140958338975906, -0.07479744404554367, 0.0007773063261993229, 0.0019172773463651538, 0.0233762226998806, -0.049905773252248764, 0.06324204057455063, 0.04132993519306183, -0.00010122825187863782, 0.06278825551271439, -0.01143803633749485, 0.06253907829523087, -0.04323449358344078, -0.045209500938653946, 0.06015327572822571, 0.04040397331118584, -0.05850999057292938, -0.014315922744572163, 0.019048765301704407, -0.014389592222869396, -0.030964285135269165, 0.01297452487051487, -0.0004900179919786751, 0.032229356467723846, 0.009725452400743961, 0.07036351412534714, 0.00017727757222019136, -0.018486546352505684, -0.011222840286791325, -0.2726791203022003, -0.008676718920469284, 0.004610305652022362, 0.02910517156124115, 0.015717169269919395, -0.0018458395497873425, 0.01788046956062317, -0.00350129883736372, -0.04001235589385033, 0.10534753650426865, 0.062356676906347275, -0.023616556078195572, -0.04487361013889313, 0.018353145569562912, -0.012498468160629272, 0.03284783661365509, 0.048191048204898834, 0.01804671622812748, -0.059196848422288895, 0.018546627834439278, -0.005650716368108988, 0.022058291360735893, -0.03200465813279152, -0.06365454196929932, 0.05396566912531853, -0.03430043160915375, 0.19214898347854614, 0.027825569733977318, 0.02826002985239029, -0.020097745582461357, 0.08233345299959183, 0.015732795000076294, -0.07797030359506607, -0.09408028423786163, 0.028162406757473946, 0.03236585482954979, 0.008766335435211658, 0.03627050668001175, 0.017457757145166397, -0.017117870971560478, -0.01271679438650608, 0.030296996235847473, 0.02968338318169117, -0.06625419110059738, 0.01105586253106594, -0.04928361997008324, -0.0333770290017128, 0.017006726935505867, -0.03438170626759529, -0.0015152757987380028, 0.01904997043311596, -0.00474568409845233, 0.05327393114566803, 0.009315465576946735, -0.01080181635916233, -0.01196291483938694, -0.06661512702703476, 0.042256910353899, -0.009417572990059853, 0.02819857932627201, -0.01678423210978508, -0.021989159286022186, -0.013762534596025944, -0.013811424374580383, 0.06214021518826485, 0.03238789364695549, -0.0031672969926148653, -0.045647963881492615, 0.014496954157948494, -0.06498527526855469, -0.06408382952213287, 0.0654371827840805, -0.0049087004736065865, 0.006614419165998697, 0.04345415532588959, 0.03393767774105072, 0.022947190329432487, -0.0426771342754364, -0.03318918123841286, -0.0014980781124904752, 0.04767883941531181, -0.02031729184091091, 0.032169632613658905, 0.018369736149907112, 0.001157225575298071, -0.0011573380324989557, 0.06572014838457108, -0.00032592660863883793, 0.014365085400640965, -0.03042476624250412, -0.01784508489072323, 0.014869374223053455, -0.049937937408685684, -0.02937435172498226, 0.04576277732849121, -0.018778620287775993, -0.31198370456695557, 0.03177432343363762, 0.01860607974231243, -0.02941802702844143, -0.006142348982393742, 0.024899695068597794, 0.022642534226179123, 0.033652856945991516, -0.04763976112008095, 0.03817551210522652, -0.008646060712635517, 0.06886428594589233, 0.03050658479332924, 0.005161161534488201, 0.017648998647928238, 0.04656306281685829, 0.04693766310811043, -0.03295638784766197, 0.05150800198316574, -0.027113309130072594, 0.06358505040407181, 0.04314231872558594, 0.23178762197494507, -0.027822211384773254, 0.04164490848779678, 0.043521955609321594, -0.027669694274663925, 0.03635990247130394, 0.03180433809757233, 0.024270743131637573, 0.014482592232525349, 0.019094299525022507, 0.08055096864700317, -0.05778016149997711, 0.05372604355216026, 0.046658776700496674, -0.0474754273891449, 0.058149296790361404, 0.009962653741240501, -0.05403843894600868, -0.04003932327032089, 0.03721172735095024, -0.009876087307929993, 0.01494594756513834, 0.11481543630361557, 0.014533963985741138, -0.03525681048631668, -0.07395809143781662, 0.029088681563735008, 0.008889333344995975, -0.07358658313751221, 0.009125771000981331, 0.005077268462628126, 0.0538567416369915, 0.04106077924370766, 0.027755742892622948, -0.07487703114748001, 0.014207812026143074, -0.03883647546172142, 0.006581160239875317, -0.006644797045737505, 0.0011312131537124515, -0.05565766245126724, -0.010060751810669899, 0.0075340550392866135 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
``` var m= { '$match': { device_id: 'device_1' } } ``` ```javascript var Twindow= { '$tumblingWindow': { interval: { size: Int32(1), unit: 'minute' }, pipeline: { '$group': { _id: '$device_id', max: { '$max': '$obs.watts' }, avg: { '$avg': '$obs.watts' } } } ] } } var delta = { '$addFields': { delta: { '$subtract': ['$max', '$avg'] } } } ``` Now we can use the .process command to run the stream processor in the foreground and view our results in the console. ``` sp.process([solarstream,m,Twindow,delta]) ``` The results of this query will be similar to the following:
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.063898965716362, -0.01814083382487297, 0.018315494060516357, -0.015645993873476982, 0.03153586387634277, -0.04198445752263069, 0.038139116019010544, -0.02579423598945141, 0.0072005270048975945, -0.007976210676133633, -0.021708112210035324, -0.04116220772266388, -0.0051348283886909485, -0.015592257492244244, -0.0035860594362020493, -0.0003846714971587062, -0.007371273823082447, 0.06567871570587158, -0.06075584143400192, 0.01788618415594101, 0.016283566132187843, -0.019764767959713936, -0.05747344344854355, -0.07062490284442902, 0.017792826518416405, 0.04206400737166405, -0.011567173525691032, -0.03625495359301567, -0.01534102950245142, -0.19679246842861176, -0.021984292194247246, -0.0861194059252739, 0.027483787387609482, -0.015308773145079613, 0.011072196066379547, -0.06444711238145828, -0.01712682656943798, 0.02970147505402565, -0.025384848937392235, 0.05508536100387573, 0.03144010901451111, -0.052010904997587204, -0.06462743133306503, -0.029317229986190796, -0.061413295567035675, -0.09276324510574341, -0.04808463156223297, -0.04101654514670372, 0.003423848422244191, -0.01445867121219635, -0.02148296684026718, -0.07219115644693375, 0.017103062942624092, -0.012957887724041939, 0.07569169253110886, 0.02745072916150093, 0.018593911081552505, 0.02476174756884575, 0.028650954365730286, -0.004762901458889246, 0.009812872856855392, 0.005880806595087051, -0.1995350420475006, 0.08783303201198578, 0.0680464506149292, 0.032706886529922485, -0.010248016566038132, -0.034241534769535065, -0.011578171513974667, -0.004509949591010809, -0.02754710614681244, 0.038857556879520416, 0.039849430322647095, 0.020101061090826988, 0.004668541718274355, -0.021573910489678383, -0.06443613767623901, -0.05254976823925972, 0.014368131756782532, 0.0568220354616642, -0.029721790924668312, -0.056607190519571304, -0.0010196963557973504, -0.01855362206697464, -0.011371474713087082, -0.020690632984042168, 0.015267533250153065, 0.006253038998693228, 0.09012629836797714, 0.02966879867017269, -0.07248666882514954, -0.034716445952653885, 0.00017886135901790112, 0.05669539421796799, -0.06093694269657135, 0.020117681473493576, 0.07574987411499023, 0.01100912969559431, 0.04655759036540985, 0.22905971109867096, -0.019839318469166756, 0.014698253944516182, 0.03660576045513153, -0.026629602536559105, 0.03926670178771019, -0.02121429331600666, -0.057279620319604874, -0.009289887733757496, 0.028888292610645294, -0.006452715955674648, 0.004920986946672201, 0.00009129994577961043, 0.024730302393436432, -0.05518065020442009, 0.030165089294314384, 0.0204906165599823, 0.003259974764660001, -0.005434732884168625, -0.012092514894902706, 0.018367191776633263, 0.03336841240525246, 0.015306438319385052, 0.017769569531083107, -0.019271912053227425, 0.0793270617723465, -0.015439921990036964, 0.10296116024255753, 0.11519972234964371, -0.019757084548473358, 0.023565281182527542, 0.08013809472322464, -0.0418168306350708, -0.06766967475414276, -0.03181234374642372, 0.013012910261750221, 0.027692120522260666, -0.001316227950155735, 0.018119340762495995, 0.008745950646698475, 0.009983018971979618, -0.02272496558725834, -0.0716535747051239, 0.014679153449833393, -0.09987866133451462, 0.019360098987817764, 0.1414595991373062, -0.03396448865532875, 0.03348860889673233, -0.0645158663392067, -0.05770130455493927, -0.023447928950190544, 0.07073362916707993, -0.054313138127326965, -0.02410154417157173, -0.02007763274013996, 0.03562583401799202, 0.028023194521665573, 0.09146913141012192, -0.022987645119428635, 0.012257643975317478, -0.04835273325443268, -0.005714206490665674, -0.028047138825058937, 0.064091257750988, 0.019495612010359764, -0.10557902604341507, -0.02860863506793976, 0.002485786797478795, 0.007155312690883875, -0.022556589916348457, -0.006654676049947739, 0.004579431843012571, -0.03375259414315224, -0.018764546141028404, 0.06667569279670715, 0.012783986516296864, -0.03470277413725853, 0.0046552931889891624, -0.006992504466325045, 0.009268542751669884, 0.01535701472312212, -0.03246034309267998, -0.0002854172489605844, 0.0105474554002285, 0.05841396749019623, -0.06061498448252678, -0.00501012708991766, -0.02791372872889042, 0.014201867394149303, 0.0641164779663086, -0.051167961210012436, -0.02167176455259323, -0.002396313240751624, -0.014812905341386795, 0.001695882761850953, -0.038017388433218, 0.0026141537819057703, -0.04778468236327171, 0.04459351301193237, -0.009977512992918491, 0.1282842755317688, 0.021063974127173424, -0.0009042842430062592, 0.038213033229112625, -0.014874222688376904, 0.05020326003432274, -0.0657176822423935, -0.029788648709654808, 0.04904024302959442, 0.033923033624887466, -0.04791688919067383, -0.015465877018868923, 0.06994947046041489, 0.006669322960078716, -0.0233137346804142, -0.018473180010914803, -0.01932653971016407, 0.038625407963991165, 0.020150450989603996, 0.04115987569093704, -0.009834586642682552, -0.06883208453655243, -0.05544000491499901, -0.24538052082061768, 0.017507031559944153, 0.021104590967297554, 0.019345847889780998, 0.0033417087979614735, -0.0378144197165966, 0.008067484945058823, -0.04109853878617287, -0.030573707073926926, 0.063995860517025, 0.08363027125597, 0.006246660370379686, 0.0025054796133190393, -0.0008563059382140636, -0.0004871570854447782, 0.04608670622110367, 0.021306246519088745, -0.01442846842110157, -0.019489649683237076, 0.00967985950410366, -0.024050818756222725, 0.015930090099573135, -0.034938994795084, -0.04513969644904137, 0.038902465254068375, 0.0024034446105360985, 0.18727931380271912, 0.045400220900774, 0.02527250163257122, -0.0665728896856308, 0.04856429621577263, -0.005359955132007599, -0.010950966738164425, -0.0602261982858181, 0.009420370683073997, 0.053659383207559586, 0.01562014501541853, 0.01658441871404648, 0.014336577616631985, -0.02161557413637638, -0.09043776243925095, 0.02771395817399025, 0.011466794647276402, -0.10087568312883377, 0.028848974034190178, -0.06206248328089714, -0.016574766486883163, 0.016907094046473503, -0.04995928704738617, 0.04105706885457039, 0.0182648878544569, 0.005402959883213043, 0.0632302314043045, 0.000008800446266832296, 0.0011049102758988738, -0.03198089078068733, -0.05715997889637947, 0.044318582862615585, -0.04046965762972832, 0.02235398069024086, 0.023181568831205368, -0.02396651916205883, -0.009906684048473835, -0.007763441186398268, 0.0638250932097435, 0.008563113398849964, -0.005611792206764221, 0.005097324959933758, 0.04025087505578995, -0.01765974797308445, -0.03206493332982063, 0.043733227998018265, -0.017580723389983177, 0.07724201679229736, 0.05399239808320999, 0.056176576763391495, 0.027234651148319244, -0.05285288020968437, -0.0065551274456083775, -0.006251554936170578, 0.06499157845973969, -0.0235135555267334, 0.04824993014335632, 0.01489871833473444, 0.021059352904558182, 0.0202967319637537, 0.0088296914473176, 0.011280215345323086, 0.019059140235185623, -0.048296600580215454, -0.0763423964381218, -0.037433985620737076, -0.04706469178199768, -0.044143978506326675, -0.0057996041141450405, 0.011926352046430111, -0.2726195454597473, 0.010602361522614956, 0.0036667026579380035, 0.008532773703336716, 0.018922848626971245, 0.017231062054634094, 0.05768420919775963, 0.03587992861866951, -0.02679547108709812, 0.04469410702586174, -0.03989504277706146, 0.013957355171442032, -0.00410890206694603, 0.005606412421911955, 0.03601188212633133, 0.06057511270046234, 0.0426989309489727, -0.0417613759636879, 0.036134734749794006, -0.04427747428417206, 0.09498980641365051, 0.08118551969528198, 0.2552453577518463, -0.012010009959340096, 0.034029435366392136, 0.06830558180809021, -0.0346529558300972, 0.05606674775481224, 0.07451196014881134, -0.00799481850117445, 0.02919069491326809, 0.018014494329690933, 0.11206933110952377, -0.017354972660541534, 0.043525539338588715, 0.0385419987142086, -0.047935351729393005, 0.028152143582701683, 0.03342706710100174, -0.04768965393304825, -0.003985210787504911, 0.009429052472114563, -0.0176237840205431, -0.0341838076710701, 0.06975693255662918, -0.029052989557385445, -0.022698769345879555, -0.08564574271440506, 0.0010026597883552313, -0.014570946805179119, -0.08885239064693451, 0.0012655319878831506, -0.0046241325326263905, -0.016028033569455147, 0.03847363591194153, 0.043809883296489716, -0.0025063815992325544, -0.002339676022529602, -0.03933985158801079, -0.020080043002963066, -0.001867764163762331, -0.07595689594745636, 0.009078961797058582, 0.03708522021770477, -0.013226420618593693 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
```json { _id: 'device_1', max: 238, avg: 75.3, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:11:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:12:00.000Z") }, delta: 162.7 } { _id: 'device_1', max: 220, avg: 125.08333333333333, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:12:00.000Z"),
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.04073255509138107, 0.0042763929814100266, 0.052308134734630585, -0.03382594510912895, 0.07465413212776184, -0.022355614230036736, 0.00898932944983244, 0.00878862850368023, -0.009247039444744587, 0.028960295021533966, -0.008399355225265026, -0.07872101664543152, -0.0051200417801737785, 0.016458310186862946, 0.003190029878169298, -0.019436994567513466, 0.03461318463087082, -0.012869684025645256, -0.06939007341861725, 0.03157613426446915, 0.05466048792004585, -0.03405573219060898, -0.011571202427148819, -0.09364036470651627, 0.03953927010297775, 0.06251461058855057, 0.0007230170303955674, -0.008250567130744457, -0.0691838264465332, -0.18602509796619415, -0.016741018742322922, -0.047549426555633545, 0.019794238731265068, -0.03732980415225029, -0.011669519357383251, -0.04233768209815025, -0.016237402334809303, 0.05045780539512634, -0.010047724470496178, 0.10337867587804794, 0.034349482506513596, -0.01937517337501049, -0.03436541184782982, -0.05714748054742813, -0.08165774494409561, -0.07105205208063126, -0.0620514340698719, -0.0018182595958933234, 0.006034097634255886, 0.006512542720884085, -0.021348198875784874, -0.0019257734529674053, -0.015140591189265251, 0.010475986637175083, 0.04671511426568031, 0.040472615510225296, 0.032076265662908554, 0.038316234946250916, 0.02726709097623825, 0.0018927714554592967, 0.017564808949828148, -0.015635354444384575, -0.19317123293876648, 0.08313696086406708, 0.06508588790893555, 0.04204408451914787, -0.0034811527002602816, -0.03116610273718834, 0.004951367154717445, -0.006505922414362431, -0.06069667637348175, 0.03717795014381409, 0.013395746238529682, 0.03285796195268631, 0.04050958529114723, -0.03393976390361786, -0.03119889460504055, -0.027258241549134254, 0.017377832904458046, 0.031263016164302826, -0.023301005363464355, -0.027713285759091377, -0.024167604744434357, -0.022868022322654724, -0.011048540472984314, -0.04036948084831238, 0.02666470780968666, -0.00963900052011013, 0.06109031289815903, -0.0006173044093884528, -0.07536696642637253, -0.00901255663484335, -0.011539634317159653, 0.059618446975946426, -0.05673878267407417, 0.02210957556962967, 0.04966944828629494, 0.02331090345978737, -0.02092592604458332, 0.21954473853111267, -0.06231330335140228, 0.009646724909543991, -0.013663942925632, -0.017265068367123604, 0.06368017941713333, -0.06082022562623024, -0.06315869092941284, -0.037608396261930466, -0.009080911055207253, 0.015435130335390568, -0.00043414486572146416, 0.01650839112699032, 0.02790907584130764, -0.04559385031461716, 0.054817892611026764, 0.009752405807375908, 0.023399338126182556, 0.017280196771025658, 0.002518740715458989, -0.0012878773268312216, 0.012109964154660702, 0.028818843886256218, 0.0384303480386734, -0.049157023429870605, 0.01786082796752453, -0.018163954839110374, 0.040006764233112335, 0.13267351686954498, 0.017962321639060974, 0.03551102802157402, 0.03755360469222069, -0.03223880007863045, -0.04003649204969406, -0.002405706327408552, -0.012396645732223988, 0.023234480991959572, -0.025036947801709175, -0.01304159127175808, 0.040394049137830734, 0.029168497771024704, -0.06959423422813416, -0.07960734516382217, -0.012450318783521652, -0.06301897019147873, -0.004958338104188442, 0.14122147858142853, -0.014908136799931526, 0.07510238885879517, -0.020393073558807373, -0.03420356288552284, -0.013844399712979794, 0.06316372007131577, -0.03172757476568222, -0.04511398449540138, 0.013702074065804482, 0.046773042529821396, 0.04584117606282234, 0.07330044358968735, -0.02044001594185829, 0.018954278901219368, -0.030523762106895447, -0.05765463039278984, -0.026746340095996857, 0.07743114978075027, 0.019217202439904213, -0.09786469489336014, -0.0036242229398339987, 0.018394077196717262, 0.0032229546923190355, -0.028290560469031334, 0.006909376475960016, 0.021473849192261696, -0.03270118311047554, 0.001974462065845728, 0.11842678487300873, 0.00409175269305706, -0.0070054358802735806, 0.03675353154540062, -0.000446094578364864, -0.00761618185788393, -0.030390623956918716, -0.04134991392493248, -0.06451127678155899, 0.03409948572516441, 0.06345769017934799, -0.04653164744377136, 0.011267121881246567, -0.06690743565559387, 0.016401944682002068, 0.057429805397987366, -0.011860275641083717, -0.01665722392499447, -0.0368942990899086, -0.02139250561594963, -0.019674841314554214, -0.021136203780770302, -0.011250395327806473, 0.030670007690787315, 0.04608244076371193, -0.07045535743236542, 0.08630724996328354, 0.011563561856746674, 0.008701221086084843, 0.02766301855444908, 0.007002697326242924, 0.021070895716547966, -0.04443279653787613, -0.01565374620258808, 0.030898794531822205, 0.018766744062304497, -0.019067734479904175, -0.028752276673913002, 0.04669904336333275, -0.020463749766349792, -0.006929753348231316, -0.0004526755656115711, -0.025738678872585297, 0.004896163009107113, 0.03825438395142555, 0.08039535582065582, -0.011535115540027618, -0.09574864059686661, -0.09124784171581268, -0.2481103241443634, 0.01533137820661068, 0.020299412310123444, -0.001110254437662661, 0.005967783275991678, -0.025266900658607483, 0.022598769515752792, -0.019133487716317177, 0.04583720862865448, 0.058233171701431274, 0.05750023201107979, 0.02218244969844818, 0.0019942941144108772, -0.013011791743338108, -0.031688250601291656, 0.07895530015230179, -0.0055541121400892735, -0.014898167923092842, -0.0015500510344281793, 0.01602950319647789, -0.03810286894440651, 0.015918554738163948, -0.03914238139986992, -0.05147862434387207, 0.04199672117829323, -0.009580482728779316, 0.2057032436132431, 0.027034929022192955, 0.03133651241660118, -0.059912919998168945, 0.06729304790496826, 0.02902715653181076, -0.014316284097731113, -0.06064199283719063, 0.028361717239022255, 0.04119270667433739, 0.016831310465931892, 0.030266985297203064, -0.023759745061397552, -0.016128698363900185, -0.05672037601470947, 0.05951683595776558, 0.03399169072508812, -0.0638696625828743, -0.018271876499056816, -0.05615556612610817, -0.02287425473332405, 0.031027914956212044, -0.04906777665019035, -0.02752958983182907, 0.05004934221506119, 0.012058324180543423, 0.06476882100105286, -0.004844489973038435, 0.0011720717884600163, -0.039699215441942215, -0.0803166925907135, 0.03748796135187149, -0.04878336191177368, 0.03988664597272873, 0.02281767874956131, -0.027323292568325996, 0.01018670666962862, -0.035665757954120636, 0.01971106231212616, -0.027994515374302864, 0.023874245584011078, -0.004683940205723047, 0.020303504541516304, -0.01941043883562088, -0.007418112829327583, 0.08592884987592697, -0.06294627487659454, 0.04175452142953873, 0.07402142882347107, 0.020431065931916237, -0.011190139688551426, -0.03129410371184349, 0.023584473878145218, -0.016908321529626846, 0.04298148304224014, -0.043527256697416306, 0.06119302287697792, 0.021657947450876236, 0.05253142490983009, 0.0212512519210577, 0.03862224519252777, 0.008584187366068363, 0.00378602696582675, -0.07683369517326355, -0.013223614543676376, -0.031209921464323997, -0.044708460569381714, -0.07591969519853592, 0.05083595961332321, 0.020777227357029915, -0.293997585773468, 0.04127740487456322, 0.00920958910137415, 0.0100311990827322, -0.007579356897622347, -0.0011136990506201982, -0.004086480941623449, 0.018275640904903412, -0.06225325167179108, 0.04206075891852379, -0.04548383504152298, 0.06893520802259445, 0.0068168542347848415, 0.002878807485103607, -0.00032548740273341537, 0.06502562761306763, 0.023917678743600845, -0.0576634407043457, 0.019816359505057335, -0.05441136285662651, 0.04393068328499794, 0.05328650400042534, 0.23814868927001953, 0.0018472635420039296, 0.014041990973055363, 0.08470138907432556, -0.008635569363832474, 0.051511622965335846, 0.08011040836572647, -0.021990232169628143, 0.002918378682807088, 0.013925245963037014, 0.0919792428612709, 0.010395587421953678, 0.02345127798616886, 0.048131998628377914, -0.07534532248973846, 0.006692942697554827, 0.017262756824493408, -0.021558811888098717, -0.007517471443861723, 0.01268549170345068, 0.00553760165348649, -0.030216732993721962, 0.08853553235530853, -0.06097228452563286, -0.05636010691523552, -0.0882786363363266, 0.027326585724949837, -0.011091307736933231, -0.06392622739076614, -0.023353729397058487, -0.030425136908888817, 0.015339581295847893, 0.005897643975913525, -0.007111947052180767, 0.004147473257035017, -0.018560588359832764, -0.028867455199360847, -0.015729553997516632, 0.03154568001627922, -0.04848841577768326, -0.032404012978076935, 0.014223204925656319, 0.009760386310517788 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
windowStartTimestamp: ISODate("2023-08-27T19:12:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:13:00.000Z") }, delta: 94.91666666666667 } { _id: 'device_1', max: 238, avg: 119.91666666666667, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:13:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:14:00.000Z") }, delta: 118.08333333333333 } ```
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.04192350059747696, 0.005057218950241804, 0.04776932671666145, -0.03538205847144127, 0.06215778738260269, -0.018820492550730705, 0.010022841393947601, 0.008382371626794338, 0.008181197568774223, 0.0186147503554821, 0.016939347609877586, -0.07109034061431885, -0.0025426147039979696, 0.013619957491755486, -0.003362217452377081, -0.0011368687264621258, 0.03512175753712654, -0.021862870082259178, -0.055309947580099106, 0.05181509256362915, 0.047600213438272476, -0.027096103876829147, -0.006308273412287235, -0.08177980035543442, 0.05147239565849304, 0.04958551377058029, 0.00044386700028553605, -0.015997683629393578, -0.06911031901836395, -0.1969079077243805, -0.01529025286436081, -0.03505495563149452, 0.02199220098555088, -0.061183150857686996, 0.010318663902580738, -0.05170697718858719, -0.014564761891961098, 0.05704772099852562, 0.0014967916067689657, 0.062246277928352356, 0.023866454139351845, -0.00775524927303195, -0.020774394273757935, -0.037044625729322433, -0.061144858598709106, -0.0869835615158081, -0.044750865548849106, 0.008836195804178715, 0.031435731798410416, -0.011634958907961845, -0.010884421877563, 0.01850363239645958, -0.016138417646288872, 0.02152797020971775, 0.040395256131887436, 0.056688424199819565, 0.01655767671763897, 0.02299857698380947, 0.03310493007302284, 0.002587447175756097, 0.015084248967468739, -0.0011501405388116837, -0.23127134144306183, 0.07582255452871323, 0.05587984248995781, 0.06211261451244354, -0.008500585332512856, -0.02399519458413124, 0.00028071008273400366, -0.01273291651159525, -0.06870599836111069, 0.020014377310872078, 0.013075743801891804, 0.042223796248435974, 0.05350630357861519, -0.025532744824886322, -0.023023588582873344, -0.021407879889011383, -0.014846157282590866, 0.04195868968963623, -0.029151074588298798, -0.02577337808907032, -0.01826540194451809, -0.022422870621085167, -0.02263222634792328, -0.04436498135328293, 0.04266408830881119, -0.01406659185886383, 0.06358595192432404, 0.00017006532289087772, -0.0687318816781044, -0.02380349487066269, -0.010238510556519032, 0.02613792195916176, -0.05064746364951134, -0.008741550147533417, 0.03721483051776886, 0.038124267011880875, -0.038658507168293, 0.21538197994232178, -0.06139940768480301, 0.012154721654951572, -0.03824230283498764, -0.025847064331173897, 0.07034085690975189, -0.05522129312157631, -0.06357038021087646, -0.05423899367451668, -0.03637884557247162, 0.003179327119141817, -0.00007115729385986924, 0.0031200412195175886, 0.05651165544986725, -0.044821448624134064, 0.07105718553066254, 0.027995189651846886, 0.013792366720736027, 0.013286610133945942, -0.0007391369435936213, 0.005286868195980787, 0.015640011057257652, 0.02956828661262989, 0.04537422955036163, -0.04259897768497467, 0.014962993562221527, -0.01627994515001774, 0.048337023705244064, 0.1295090913772583, 0.020418433472514153, 0.036789290606975555, 0.04875122755765915, -0.032709136605262756, -0.0382833331823349, -0.006718552205711603, 0.0015372905181720853, 0.02485409379005432, -0.03819695860147476, -0.015634361654520035, 0.050419583916664124, 0.008213819935917854, -0.08208013325929642, -0.08541592955589294, -0.0024837139062583447, -0.06444728374481201, -0.025133175775408745, 0.15991154313087463, -0.020965885370969772, 0.06591533124446869, -0.016206422820687294, -0.025893600657582283, -0.007584265898913145, 0.03970266133546829, -0.05622272193431854, -0.024036211892962456, -0.005610455293208361, 0.032429806888103485, 0.06432632356882095, 0.09224791079759598, -0.03267836943268776, 0.03709907829761505, -0.029686693102121353, -0.06075701862573624, -0.04027038812637329, 0.0762028843164444, 0.035643093287944794, -0.08466386795043945, -0.01838616654276848, 0.01759452372789383, 0.0022307296749204397, -0.030192892998456955, -0.006028961390256882, 0.025050047785043716, -0.015430173836648464, 0.0037932402919977903, 0.09362930804491043, -0.008225309662520885, -0.003680621273815632, 0.026638319715857506, -0.021000264212489128, 0.006039951927959919, -0.03349070996046066, -0.05817674100399017, -0.07218652218580246, 0.051658570766448975, 0.061631735414266586, -0.054074518382549286, 0.023526860401034355, -0.07157307863235474, 0.030021732673048973, 0.04807686433196068, -0.010877158492803574, -0.005110760685056448, -0.008307953365147114, -0.016447171568870544, -0.033282384276390076, -0.03816111758351326, -0.021472344174981117, 0.051527537405490875, 0.06882891803979874, -0.06780888140201569, 0.10661566257476807, 0.005561984144151211, -0.009665369056165218, 0.010376490652561188, -0.0065612271428108215, 0.0192960724234581, -0.03133126720786095, -0.03894856944680214, 0.03711939975619316, 0.020667128264904022, -0.008430077694356441, -0.0231902115046978, 0.06376790255308151, -0.013889831490814686, -0.006477417424321175, -0.0006963224150240421, -0.0055021499283611774, 0.012679713778197765, 0.0443657711148262, 0.07744335383176804, -0.01405200082808733, -0.05971192568540573, -0.0937008336186409, -0.23910899460315704, 0.022398831322789192, -0.0004754639812745154, -0.007321733515709639, -0.01801999844610691, -0.021804597228765488, 0.02657178044319153, -0.023082230240106583, 0.05151006951928139, 0.0526556596159935, 0.0604417659342289, 0.01577545702457428, -0.0025771951768547297, -0.019240727648139, -0.01214658934623003, 0.06862056255340576, -0.010062295012176037, -0.0032097382936626673, 0.013427168130874634, 0.0053077875636518, -0.029196828603744507, 0.014949343167245388, -0.051734838634729385, -0.03404134884476662, 0.04946881905198097, -0.014928258024156094, 0.17525219917297363, 0.047103844583034515, 0.03863232210278511, -0.04234783723950386, 0.05635986104607582, 0.03246031329035759, -0.010183060541749, -0.07006661593914032, 0.03295796737074852, 0.042409274727106094, 0.009883208200335503, 0.02155904844403267, -0.013223763555288315, -0.0035375969018787146, -0.06843587756156921, 0.04248984903097153, 0.019435664638876915, -0.061838243156671524, -0.018127644434571266, -0.04123231768608093, -0.014680027961730957, 0.035652779042720795, -0.04902411997318268, 0.004783002194017172, 0.04095207154750824, 0.008859599940478802, 0.06073255091905594, -0.00042070442577823997, 0.0198658537119627, -0.05757300555706024, -0.08810187876224518, 0.05048872530460358, -0.028928080573678017, 0.028521908447146416, 0.010910339653491974, -0.04408204182982445, 0.02784653566777706, -0.04492226988077164, 0.012478784658014774, -0.024587107822299004, 0.018860967829823494, -0.02507617697119713, 0.0397026464343071, -0.007809785194694996, -0.0049308729358017445, 0.0852898433804512, -0.0654989704489708, 0.020483963191509247, 0.06596366316080093, 0.026904486119747162, -0.012971361167728901, -0.014171668328344822, 0.01596076413989067, -0.029258012771606445, 0.03686898574233055, -0.046816907823085785, 0.07337947189807892, 0.01923827826976776, 0.07652406394481659, 0.0034214931074529886, 0.05224597081542015, 0.008769377134740353, 0.011866308748722076, -0.07334784418344498, -0.015521292574703693, -0.013725086115300655, -0.040886715054512024, -0.0746900662779808, 0.038724374026060104, 0.0019856025464832783, -0.29217401146888733, 0.030759800225496292, 0.0007706295000389218, 0.006080572493374348, -0.024125194177031517, -0.014541600830852985, -0.009592750109732151, 0.010732054710388184, -0.05328613519668579, 0.014604782685637474, -0.06142179295420647, 0.04157554358243942, -0.004170847591012716, 0.004011610057204962, -0.0187078807502985, 0.05182499811053276, 0.0192465391010046, -0.04352383688092232, 0.02345869317650795, -0.056111983954906464, 0.03528125211596489, 0.034269463270902634, 0.2406970113515854, 0.018932009115815163, 0.014136355370283127, 0.07966317236423492, 0.011104870587587357, 0.058000583201646805, 0.10332703590393066, -0.025644658133387566, 0.008183994330465794, -0.016767771914601326, 0.08141147345304489, -0.022284245118498802, 0.03253659978508949, 0.04079652577638626, -0.0758591964840889, 0.03363172709941864, 0.007073761895298958, -0.002349478891119361, -0.01982531137764454, 0.006642759777605534, 0.00128254818264395, -0.05046035721898079, 0.07680085301399231, -0.05801808834075928, -0.037429045885801315, -0.0786842629313469, 0.020642055198550224, 0.02120335027575493, -0.05728263780474663, -0.0070800487883389, -0.03195944428443909, 0.025477634742856026, 0.032767876982688904, 0.002357370452955365, -0.010365838184952736, -0.04017895087599754, -0.03178729489445686, -0.018196770921349525, 0.038139861077070236, -0.03411833569407463, -0.012904911302030087, 0.01561052817851305, 0.02648831345140934 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
Notice the time segments and how they align on the minute. ![Time segments aligned on the minute][1] Additionally, notice that the output includes the difference between the calculated values of maximum and average for each window. ## Create a hopping window A hopping window, sometimes referred to as a sliding window, is a fixed-size window that moves forward in time at overlapping intervals. In Atlas Stream Processing, you use the `$hoppingWindow` operator. In this example, let’s use the operator to see the average.
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.07166609913110733, -0.021013671532273293, 0.04947468638420105, -0.006552341394126415, 0.019174879416823387, 0.03226522356271744, 0.04914402216672897, -0.018224550411105156, 0.03693750500679016, -0.01090160571038723, -0.0012216155882924795, -0.02683074213564396, 0.001475909142754972, 0.006982921157032251, -0.018654746934771538, 0.005372846499085426, -0.03656015172600746, 0.024107839912176132, -0.049724776297807693, 0.03221945837140083, 0.02747119404375553, -0.0417235791683197, -0.03030836395919323, -0.04915885254740715, 0.03593071922659874, 0.04660484939813614, -0.08529255539178848, -0.036133844405412674, -0.03898032382130623, -0.1908935159444809, 0.0011228984221816063, -0.05587317422032356, 0.03760765120387077, -0.04392246901988983, -0.006448076106607914, -0.012176642194390297, -0.07672204077243805, 0.06879306584596634, -0.03282959386706352, 0.04737651348114014, 0.0557980015873909, 0.018434938043355942, -0.029802817851305008, -0.06847640126943588, -0.0649338960647583, -0.06240951642394066, -0.0555778443813324, 0.011708934791386127, 0.011305689811706543, 0.009836757555603981, -0.010278968140482903, -0.025909285992383957, 0.07478635013103485, 0.020394546911120415, 0.03281072899699211, 0.038661036640405655, 0.07492844015359879, 0.028362272307276726, 0.04780106619000435, -0.0149361127987504, 0.02916760742664337, 0.012694176286458969, -0.1888384371995926, 0.07803560048341751, 0.07278251647949219, 0.014323031529784203, 0.006081665400415659, -0.008327603340148926, 0.0230199433863163, 0.03995192423462868, -0.06583019345998764, -0.019263703376054764, 0.01050474401563406, 0.035171184688806534, 0.03778403624892235, -0.030736081302165985, -0.02018914371728897, -0.006392726209014654, -0.01772790402173996, 0.025018887594342232, -0.005314358510077, -0.03890328109264374, -0.003936112858355045, -0.010138486512005329, -0.02736794389784336, 0.019332651048898697, 0.056660041213035583, -0.04853647202253342, 0.058907974511384964, 0.0023059025406837463, -0.032881781458854675, -0.039351362735033035, -0.04186776652932167, 0.026420222595334053, -0.006965631153434515, 0.01511126384139061, 0.04492753744125366, 0.02899138443171978, 0.0034639849327504635, 0.2167719602584839, -0.0467384047806263, 0.049892570823431015, 0.052202362567186356, -0.0379505529999733, 0.03999098390340805, -0.05238518491387367, -0.0455961599946022, -0.003995530307292938, -0.032562676817178726, 0.023574694991111755, -0.013959336094558239, -0.014580066315829754, 0.06428389996290207, -0.058057479560375214, 0.01571846939623356, -0.004638405982404947, 0.020434362813830376, 0.005633150693029165, 0.014206044375896454, 0.029240645468235016, -0.03267108276486397, 0.01118218433111906, 0.036525219678878784, -0.032969120889902115, 0.029376165941357613, -0.050697777420282364, 0.03257536515593529, 0.1114167794585228, 0.022938238456845284, 0.03671221807599068, 0.07363394647836685, -0.03560210391879082, -0.014576074667274952, 0.005126159638166428, -0.028047338128089905, -0.012318235822021961, -0.0023575585801154375, 0.019544804468750954, 0.014385456219315529, -0.03540054336190224, -0.054457079619169235, -0.030646156519651413, 0.040826115757226944, -0.10497993230819702, -0.039116427302360535, 0.13479158282279968, -0.047546908259391785, 0.03918464109301567, -0.040731385350227356, -0.011879023164510727, -0.019472047686576843, 0.006202520802617073, -0.05991045758128166, -0.05255237966775894, 0.00321155390702188, 0.040141504257917404, 0.04342307522892952, 0.08609205484390259, -0.05064702033996582, 0.02029803954064846, -0.0568147636950016, -0.05368499085307121, -0.016643119975924492, 0.067689448595047, 0.05256904661655426, -0.07821530848741531, -0.028951188549399376, 0.026844820007681847, -0.008485384285449982, -0.030754471197724342, 0.018205098807811737, 0.01731087639927864, -0.02046467922627926, 0.0030256654135882854, 0.09821891039609909, 0.036017920821905136, -0.04434576258063316, 0.025069639086723328, 0.022320860996842384, 0.020771216601133347, 0.0789206326007843, -0.05802712216973305, -0.03618511185050011, 0.019140005111694336, 0.05570874735713005, -0.024799123406410217, -0.015919256955385208, -0.04944482445716858, 0.02260732278227806, 0.06745730340480804, -0.04599129036068916, -0.029103027656674385, 0.032847948372364044, -0.045662228018045425, -0.031725943088531494, -0.045299701392650604, 0.0071964929811656475, 0.012070917524397373, -0.00018580486357677728, 0.00245283218100667, 0.06872209161520004, -0.014270761981606483, -0.012415055185556412, 0.029506279155611992, 0.023957250639796257, 0.010591292753815651, -0.027458103373646736, -0.024043234065175056, 0.04606520012021065, 0.011087452061474323, -0.026705116033554077, -0.03809846192598343, 0.03303852304816246, -0.03332194313406944, -0.03245166316628456, -0.02771429345011711, -0.010815967805683613, 0.019858267158269882, -0.01857123151421547, 0.05369368940591812, 0.010430455207824707, -0.0406678207218647, -0.061539217829704285, -0.26240620017051697, 0.010967661626636982, -0.009738837368786335, 0.05390739068388939, 0.02471129782497883, -0.028758110478520393, 0.00801363866776228, -0.03484712913632393, 0.046702299267053604, 0.022280700504779816, 0.07424746453762054, -0.005793379154056311, 0.01967633329331875, -0.01178943831473589, -0.013695570640265942, 0.09336786717176437, -0.005400515627115965, 0.04123205319046974, -0.027643883600831032, 0.012787586078047752, -0.014674985781311989, 0.04357262700796127, -0.04344196245074272, -0.06468188762664795, 0.041248396039009094, -0.005050765350461006, 0.18509633839130402, 0.04483779892325401, 0.07872021943330765, -0.044991131871938705, 0.07793714851140976, 0.046277228742837906, -0.029789762571454048, -0.05107636749744415, 0.047021642327308655, 0.07144880294799805, 0.0074744271114468575, 0.023996246978640556, -0.02095649763941765, -0.02975030243396759, -0.07887586206197739, 0.034652646631002426, 0.01935986801981926, -0.09298309683799744, -0.030285697430372238, -0.016769452020525932, -0.008647589944303036, -0.01217997632920742, -0.030110608786344528, -0.025893887504935265, 0.0047687808983027935, -0.059423550963401794, 0.031225942075252533, 0.01346579659730196, 0.001116124214604497, -0.03202633187174797, -0.0699184238910675, 0.027809349820017815, -0.03959020972251892, -0.008707287721335888, 0.004124559462070465, -0.03794623166322708, 0.03927398473024368, -0.028780212625861168, 0.03457200527191162, -0.010604387149214745, -0.012070419266819954, -0.04766480624675751, 0.006549011915922165, 0.001392359845340252, -0.013793423771858215, 0.09434879571199417, -0.0481693372130394, -0.013827808201313019, 0.021258261054754257, 0.02928546443581581, 0.025139009580016136, 0.01241761352866888, -0.0036423993296921253, -0.017879828810691833, -0.005167765077203512, -0.05379040166735649, 0.05731471627950668, 0.020697971805930138, 0.04240620508790016, -0.020631926134228706, 0.04155780375003815, -0.024626972153782845, 0.01511603593826294, -0.027676766738295555, 0.006170092616230249, 0.01655052974820137, -0.039754465222358704, -0.05746889486908913, -0.016099583357572556, 0.004731140099465847, -0.3034248650074005, 0.07554091513156891, -0.010528840124607086, -0.004616649821400642, -0.023659760132431984, -0.03432713821530342, 0.021998118609189987, 0.03349510580301285, -0.032386552542448044, -0.003971602767705917, -0.029202178120613098, 0.08341855555772781, 0.0332854688167572, -0.01794097013771534, 0.018977412953972816, 0.04788428172469139, 0.07121346145868301, -0.04653431475162506, 0.03610369190573692, -0.04635373875498772, 0.0559757836163044, 0.01460728794336319, 0.25315243005752563, -0.009525909088551998, 0.06685654819011688, 0.044221244752407074, -0.02349000982940197, -0.016359329223632812, 0.015893835574388504, -0.007693681865930557, 0.022634098306298256, 0.019273854792118073, 0.14517682790756226, -0.03196043521165848, 0.024259237572550774, 0.04596125707030296, -0.03386019915342331, 0.04797706380486488, 0.03624223545193672, -0.017789997160434723, -0.020869284868240356, 0.021189624443650246, 0.002491746097803116, -0.027752798050642014, 0.10388123989105225, -0.0030326603446155787, -0.00769296707585454, -0.0744306817650795, -0.02162500098347664, 0.024714941158890724, -0.07583274692296982, 0.012617907486855984, -0.016423439607024193, 0.03177172318100929, 0.017529064789414406, 0.00526023143902421, -0.04345669224858284, -0.03313756361603737, -0.026570912450551987, 0.036237962543964386, 0.00032647320767864585, -0.12038224190473557, 0.005413641221821308, -0.02477867156267166, 0.01782541163265705 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
```javascript var Hwindow = { '$hoppingWindow': { interval: { size: 1, unit: 'minute' }, hopSize: { size: 30, unit: 'second' }, pipeline: [ { '$group': { _id: '$device_id', max: { '$max': '$obs.watts' }, avg: { '$avg': '$obs.watts' } } } ] } } ``` To help illustrate the start and end time segments, let's create a filter to only return device_1. ``` var m = { '$match': { device_id: 'device_1' } } ``` Now let’s issue the `.process` command to view the results in the console. ``` sp.process([solarstream,m,Hwindow]) ``` An example result is as follows:
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.07824836671352386, -0.006098929792642593, 0.04394914209842682, -0.044625137001276016, 0.036681368947029114, -0.023785656318068504, 0.037727102637290955, -0.014739811420440674, 0.02055465616285801, -0.01616945117712021, -0.011969096027314663, -0.03755716606974602, -0.0033204667270183563, 0.001603093696758151, -0.01865334063768387, -0.0051778401248157024, -0.01863967999815941, 0.06929545849561691, -0.06497185677289963, 0.012215401977300644, 0.03538200259208679, -0.022660132497549057, -0.05612746253609657, -0.0607173889875412, 0.023953178897500038, 0.05137958750128746, -0.01928415521979332, -0.0004527840355876833, -0.0033633820712566376, -0.2156398743391037, -0.021326201036572456, -0.08033312112092972, 0.027487365528941154, -0.04007866978645325, -0.001912869280204177, -0.016696179285645485, -0.04375369846820831, 0.04434513673186302, -0.04651932418346405, 0.06344624608755112, 0.04570614546537399, -0.018306918442249298, -0.04546651989221573, -0.04722476005554199, -0.06732038408517838, -0.09485554695129395, -0.06115012615919113, -0.055511657148599625, -0.014462988823652267, 0.005265260115265846, -0.025856254622340202, -0.05301462858915329, 0.041058484464883804, -0.017236612737178802, 0.05848678573966026, 0.048610035330057144, 0.023114269599318504, 0.04102601855993271, 0.041805095970630646, 0.001513784402050078, -0.012086267583072186, 0.002911883872002363, -0.19351930916309357, 0.08440572768449783, 0.06819874048233032, 0.045989859849214554, 0.006782818585634232, -0.027529900893568993, -0.014628908596932888, 0.016132500022649765, -0.015668923035264015, 0.029084958136081696, 0.02558637037873268, 0.02277367189526558, -0.010427647270262241, -0.039951249957084656, -0.0606607161462307, -0.055685997009277344, 0.01973761059343815, 0.05255366116762161, -0.037074483931064606, -0.04750875383615494, -0.005497131496667862, -0.024557963013648987, -0.012387382797896862, -0.03713162988424301, 0.01741247996687889, -0.015988664701581, 0.07355915009975433, 0.041902925819158554, -0.07943075895309448, -0.035958342254161835, -0.003208187175914645, 0.04298168048262596, -0.05950092151761055, 0.004119247663766146, 0.05560899153351784, 0.02447732537984848, 0.017486682161688805, 0.2121923714876175, -0.03674525022506714, 0.04442322626709938, 0.0448443740606308, -0.04689771682024002, 0.022023538127541542, -0.029453372582793236, -0.057874806225299835, -0.016675103455781937, 0.034600090235471725, 0.006651156581938267, -0.007185002323240042, -0.0071549792774021626, 0.03137655556201935, -0.060924459248781204, 0.019659381359815598, 0.0126498369500041, 0.014912317506968975, 0.001029302249662578, 0.009292696602642536, 0.006320440676063299, 0.026779290288686752, 0.021873455494642258, 0.035156842321157455, -0.003388111712411046, 0.028110094368457794, 0.008487881161272526, 0.08051138371229172, 0.11479032784700394, 0.0024555721320211887, 0.030661648139357567, 0.0804058313369751, -0.02347373776137829, -0.04608267918229103, -0.007026038132607937, -0.009416686370968819, 0.026476971805095673, 0.005464197136461735, 0.020342543721199036, 0.025148868560791016, -0.002174189779907465, -0.01728142984211445, -0.052472684532403946, -0.02574254758656025, -0.09636211395263672, 0.026806678622961044, 0.1294480264186859, -0.034566156566143036, 0.052489425987005234, -0.061702944338321686, -0.04846601560711861, -0.045957230031490326, 0.04947866499423981, -0.07617282122373581, -0.02924206107854843, -0.0029556341469287872, 0.04344630613923073, 0.03151176497340202, 0.06691210716962814, -0.014235044829547405, 0.03204137831926346, -0.045255664736032486, 0.005840986501425505, -0.02854284457862377, 0.057661768049001694, 0.04610569775104523, -0.05178786814212799, -0.01866147480905056, 0.013771643862128258, -0.0010721732396632433, -0.028950953856110573, -0.03189266845583916, 0.022110819816589355, -0.03577037900686264, -0.03652995079755783, 0.09267745167016983, 0.012184525839984417, -0.04192718490958214, 0.00808959361165762, -0.0028237570077180862, 0.010250900872051716, 0.03727910667657852, -0.034844670444726944, -0.00629590405151248, -0.01557677611708641, 0.08976709842681885, -0.05122102051973343, 0.0003225836844649166, -0.026738323271274567, -0.002454126952216029, 0.07520288228988647, -0.0518791563808918, -0.02504444122314453, 0.008459989912807941, -0.039284586906433105, 0.0016243524150922894, -0.05793283134698868, -0.006244624964892864, -0.02925577573478222, 0.01308700256049633, -0.00919830147176981, 0.11541672050952911, 0.010325529612600803, 0.0006975207361392677, 0.05432123690843582, -0.027294429019093513, 0.04769333451986313, -0.05382159352302551, -0.026390423998236656, 0.07528875023126602, 0.022562796249985695, -0.06902588158845901, -0.012531903572380543, 0.07131332159042358, -0.003917050082236528, -0.010371592827141285, -0.04642743989825249, -0.014018112793564796, 0.03610493615269661, 0.03924231231212616, 0.06253060698509216, -0.01058296486735344, -0.04854161664843559, -0.0667271763086319, -0.257301390171051, 0.02457074262201786, 0.03592786565423012, 0.0326475128531456, 0.03468388319015503, -0.03488696366548538, -0.006031777709722519, -0.04802928864955902, -0.021375635638833046, 0.040932849049568176, 0.08173424750566483, -0.012532108463346958, -0.005790817551314831, -0.00031372872763313353, -0.005370356608182192, 0.06189988553524017, 0.017138460651040077, -0.00785754807293415, 0.001523973187431693, 0.01965607888996601, -0.031332869082689285, 0.014021134935319424, -0.04494832828640938, -0.07186386734247208, 0.006051007658243179, -0.02683989889919758, 0.19512897729873657, 0.05553353577852249, 0.047742899507284164, -0.06928608566522598, 0.0586143434047699, 0.003743007779121399, 0.007454385980963707, -0.03926029056310654, 0.007934030145406723, 0.06718868762254715, 0.01324967760592699, 0.019163697957992554, 0.024371743202209473, -0.02728615328669548, -0.05735825002193451, 0.015714455395936966, 0.022536998614668846, -0.0761880874633789, 0.026769857853651047, -0.05678628757596016, -0.026991942897439003, 0.04129432514309883, -0.039657458662986755, -0.020491883158683777, 0.03678019717335701, -0.006541234441101551, 0.07522371411323547, -0.001964827300980687, 0.012553752399981022, -0.021143067628145218, -0.04256562143564224, 0.035958580672740936, -0.03573087602853775, 0.014145409688353539, 0.008266529999673367, -0.025726130232214928, 0.005238781217485666, -0.018705084919929504, 0.04682048410177231, 0.009095572866499424, -0.0019637506920844316, -0.013396239839494228, 0.011600960046052933, -0.004191480111330748, -0.03392026200890541, 0.06800316274166107, -0.00985519029200077, 0.04555262252688408, 0.0466475747525692, 0.027499986812472343, -0.000795756233856082, -0.031231626868247986, -0.021321818232536316, -0.007260979153215885, 0.049585722386837006, -0.05093224346637726, 0.03287699073553085, 0.03700468689203262, 0.02252006158232689, 0.013131500221788883, -0.004726907704025507, 0.011180799454450607, 0.02750544808804989, -0.04348301142454147, -0.045002855360507965, -0.01931775175035, -0.06999441981315613, -0.05010444298386574, 0.0194841381162405, 0.014756748452782631, -0.27202868461608887, 0.04259738698601723, 0.02314155176281929, 0.02162504568696022, 0.019338330253958702, 0.011672216467559338, 0.026448888704180717, 0.019329415634274483, -0.031049219891428947, 0.011299410834908485, -0.047789059579372406, 0.02396552637219429, 0.02310040034353733, 0.0035912184976041317, 0.01497942116111517, 0.06800835579633713, 0.03817497193813324, -0.02092050574719906, 0.05047310143709183, -0.03721568360924721, 0.0960191860795021, 0.06502877175807953, 0.2585531175136566, -0.028116021305322647, 0.02167314849793911, 0.05140304192900658, -0.039860308170318604, 0.028688080608844757, 0.055006545037031174, -0.03335628658533096, 0.026967070996761322, 0.027578476816415787, 0.1324613094329834, -0.0029763057827949524, 0.03038707748055458, 0.03332459181547165, -0.04000430926680565, 0.03771552816033363, 0.009921987541019917, -0.04240463674068451, -0.01923949085175991, 0.012249783612787724, 0.01078848447650671, -0.04776165261864662, 0.08837802708148956, -0.041913144290447235, -0.036899011582136154, -0.10297182947397232, 0.0015891453949734569, -0.0034777820110321045, -0.09927850216627121, -0.024271147325634956, -0.012695162557065487, 0.013246316462755203, 0.04526335746049881, 0.034239694476127625, -0.0019845215138047934, -0.02908731810748577, -0.03949136286973953, -0.0019246777519583702, -0.01283253077417612, -0.07668666541576385, 0.032674938440322876, 0.041529979556798935, -0.006452661938965321 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
```json { _id: 'device_1', max: 238, avg: 76.625, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:37:30.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:38:30.000Z") } } { _id: 'device_1', max: 238, avg: 82.71428571428571, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:38:00.000Z"),
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.04295774921774864, 0.0006684493855573237, 0.05419166386127472, -0.038589153438806534, 0.07302572578191757, -0.022559432312846184, 0.011814754456281662, 0.017255695536732674, -0.009724478237330914, 0.029542602598667145, -0.006891238037496805, -0.08086171746253967, -0.005541868042200804, 0.013804072514176369, 0.001022070413455367, -0.01374768652021885, 0.031096672639250755, -0.009888418018817902, -0.07124043256044388, 0.028897326439619064, 0.0589677132666111, -0.037445347756147385, -0.012094144709408283, -0.09861628711223602, 0.03728321194648743, 0.065889872610569, -0.00332570169121027, -0.002899108687415719, -0.06899451464414597, -0.18790696561336517, -0.010087781585752964, -0.0481095127761364, 0.021606042981147766, -0.03225182369351387, -0.01305485237389803, -0.041489891707897186, -0.014811601489782333, 0.04742893949151039, -0.011836360208690166, 0.10662457346916199, 0.03447911515831947, -0.012918597087264061, -0.02949974685907364, -0.05940672382712364, -0.07498467713594437, -0.06549285352230072, -0.06473425775766373, -0.0012979243183508515, 0.0070357732474803925, 0.01027744822204113, -0.02424577996134758, -0.0015459663700312376, -0.015940377488732338, 0.010527613572776318, 0.04983061924576759, 0.03918963298201561, 0.03865215182304382, 0.027125760912895203, 0.029790058732032776, 0.0031203164253383875, 0.016504934057593346, -0.01595417596399784, -0.1915959119796753, 0.07733641564846039, 0.06941467523574829, 0.04421799257397652, -0.0055581810884177685, -0.03257489204406738, 0.009651699103415012, -0.007306006271392107, -0.058740753680467606, 0.03292788192629814, 0.010385886766016483, 0.029544774442911148, 0.03292372450232506, -0.032827429473400116, -0.02962324768304825, -0.026933912187814713, 0.022134529426693916, 0.03682290390133858, -0.031411636620759964, -0.029707495123147964, -0.028803041204810143, -0.024136798456311226, -0.015797095373272896, -0.039613988250494, 0.025505749508738518, -0.016361549496650696, 0.06365752220153809, 0.0022285778541117907, -0.0679793506860733, -0.007101091556251049, -0.012710010632872581, 0.05220591276884079, -0.05757071077823639, 0.021206345409154892, 0.04472871869802475, 0.031844090670347214, -0.021398931741714478, 0.2210376262664795, -0.05957866087555885, 0.008180123753845692, -0.012027539312839508, -0.021370837464928627, 0.06720076501369476, -0.06432441622018814, -0.0687546655535698, -0.031001415103673935, -0.010130571201443672, 0.014410320669412613, 0.0011205535847693682, 0.018594829365611076, 0.026289643719792366, -0.04846985265612602, 0.059336449950933456, 0.009523614309728146, 0.020253106951713562, 0.019538428634405136, 0.0016805609920993447, -0.0015601577470079064, 0.012729364447295666, 0.02698696032166481, 0.04026465862989426, -0.04908762499690056, 0.018190572038292885, -0.025227153673768044, 0.03823060169816017, 0.1328732669353485, 0.012374622747302055, 0.03819949924945831, 0.03315191715955734, -0.029070211574435234, -0.0368228517472744, -0.000004232924766256474, -0.009031154215335846, 0.026483498513698578, -0.024794675409793854, -0.009474541991949081, 0.03919563442468643, 0.02885870262980461, -0.06355233490467072, -0.08051680028438568, -0.014477662742137909, -0.06427051872015, -0.0026453195605427027, 0.14323431253433228, -0.013693248853087425, 0.07647138833999634, -0.019537780433893204, -0.042966604232788086, -0.021888980641961098, 0.06402982026338577, -0.04064817726612091, -0.04707394167780876, 0.00835022795945406, 0.04232953116297722, 0.04550015926361084, 0.06691201776266098, -0.015712859109044075, 0.010302780196070671, -0.03153679519891739, -0.05223775655031204, -0.023382660001516342, 0.0738062933087349, 0.018462931737303734, -0.10178695619106293, -0.004974232986569405, 0.021622272208333015, 0.005474172066897154, -0.024648290127515793, -0.0013476931490004063, 0.02043951116502285, -0.032494042068719864, -0.0013481536880135536, 0.12341981381177902, 0.002052829135209322, -0.008025926537811756, 0.03914492204785347, 0.0020608550403267145, -0.008267231285572052, -0.028182344511151314, -0.03815693408250809, -0.06113646179437637, 0.032803378999233246, 0.06394017487764359, -0.039984505623579025, 0.012935757637023926, -0.06087566539645195, 0.01533782109618187, 0.053765084594488144, -0.007416022475808859, -0.016826555132865906, -0.0486401692032814, -0.02184349298477173, -0.0231751948595047, -0.019678058102726936, -0.010285094380378723, 0.029659530147910118, 0.04063818231225014, -0.07240355759859085, 0.08505551517009735, 0.011864013969898224, 0.006741521880030632, 0.03173596039414406, 0.005686073563992977, 0.019115976989269257, -0.04486093297600746, -0.011975220404565334, 0.031828783452510834, 0.016544407233595848, -0.021437935531139374, -0.028480572625994682, 0.04755320027470589, -0.019629891961812973, -0.006286811549216509, 0.0005400913651101291, -0.01861295849084854, 0.0026564626023173332, 0.03837696835398674, 0.08227850496768951, -0.006109447684139013, -0.09825563430786133, -0.09601040929555893, -0.2490607649087906, 0.016156628727912903, 0.02587577886879444, -0.0023588689509779215, 0.008296418003737926, -0.027124425396323204, 0.025040343403816223, -0.025111215189099312, 0.04234112799167633, 0.0538005530834198, 0.05709625408053398, 0.018516309559345245, -0.0013589314185082912, -0.013853127136826515, -0.030247867107391357, 0.07894008606672287, -0.005587799474596977, -0.012339233420789242, -0.0028599610086530447, 0.01928546279668808, -0.03660757094621658, 0.02242378704249859, -0.04070340842008591, -0.05470356345176697, 0.03990165889263153, -0.0030316724441945553, 0.2062804102897644, 0.025122154504060745, 0.019784200936555862, -0.058577876538038254, 0.06582994759082794, 0.02345694787800312, -0.014917522668838501, -0.06010738015174866, 0.03190809115767479, 0.04134225472807884, 0.01999119482934475, 0.028545036911964417, -0.021764539182186127, -0.016530537977814674, -0.05540549010038376, 0.058436281979084015, 0.03440173342823982, -0.06408616900444031, -0.01828129030764103, -0.051270246505737305, -0.02170693874359131, 0.02729707956314087, -0.04525018855929375, -0.02239043079316616, 0.05135483667254448, 0.0043692318722605705, 0.06596219539642334, -0.007981037721037865, 0.001742761000059545, -0.0395391508936882, -0.07770905643701553, 0.03501830995082855, -0.04446195438504219, 0.04205454885959625, 0.019081037491559982, -0.02656499296426773, 0.01509595662355423, -0.030275078490376472, 0.0256247166544199, -0.025106703862547874, 0.01933903619647026, -0.005220719147473574, 0.021244430914521217, -0.01876920461654663, -0.0037754776421934366, 0.08011562377214432, -0.05884188041090965, 0.04454123228788376, 0.06978479772806168, 0.0275691207498312, -0.009062928147614002, -0.026815924793481827, 0.026406046003103256, -0.014978107064962387, 0.04133257642388344, -0.042619943618774414, 0.06327307224273682, 0.021684255450963974, 0.06118763983249664, 0.01870366372168064, 0.03700537607073784, 0.011229007504880428, 0.0051008858717978, -0.07614187151193619, -0.011039862409234047, -0.030565371736884117, -0.04309505969285965, -0.07669197022914886, 0.04098883643746376, 0.024436617270112038, -0.2953732907772064, 0.043288856744766235, 0.00918612815439701, 0.009515892714262009, -0.00965101644396782, -0.005909700412303209, -0.00006539135938510299, 0.014609863050282001, -0.06432612240314484, 0.04644295945763588, -0.038298364728689194, 0.07004667818546295, 0.006527206860482693, -0.0019466906087473035, 0.0010914179729297757, 0.06698106974363327, 0.02148618921637535, -0.05340952053666115, 0.022330883890390396, -0.056137342005968094, 0.044529642909765244, 0.05290709435939789, 0.24081629514694214, -0.0009290848392993212, 0.014481241814792156, 0.082365021109581, -0.014882022514939308, 0.04753001034259796, 0.08720386028289795, -0.028378795832395554, 0.001223438186571002, 0.014425452798604965, 0.0883275493979454, 0.011238445527851582, 0.02958696149289608, 0.03889508172869682, -0.06937328726053238, 0.00793687254190445, 0.021801816299557686, -0.01893911324441433, -0.015211907215416431, 0.009200304746627808, 0.004136220086365938, -0.03254944458603859, 0.09367553144693375, -0.06127425655722618, -0.0626518577337265, -0.09102688729763031, 0.026815475896000862, -0.01563381403684616, -0.0576009675860405, -0.025305766612291336, -0.02732713520526886, 0.014376170933246613, 0.009143921546638012, -0.016647331416606903, 0.009440037421882153, -0.01896202564239502, -0.029675375670194626, -0.016503429040312767, 0.026167461648583412, -0.04718891158699989, -0.030632920563220978, 0.018448924645781517, 0.009415877982974052 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
windowStartTimestamp: ISODate("2023-08-27T19:38:00.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:39:00.000Z") } } { _id: 'device_1', max: 220, avg: 105.54545454545455, _stream_meta: { sourceType: 'sampleData', windowStartTimestamp: ISODate("2023-08-27T19:38:30.000Z"), windowEndTimestamp: ISODate("2023-08-27T19:39:30.000Z") } } ```
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.047265421599149704, 0.001993212616071105, 0.03947646915912628, -0.03295068070292473, 0.05066690221428871, -0.013895689509809017, 0.011128689162433147, 0.007951563224196434, 0.00411618547514081, 0.015802815556526184, 0.021963506937026978, -0.07337607443332672, 0.0031348394695669413, 0.015390357002615929, -0.001750068855471909, 0.0043527958914637566, 0.036387283354997635, -0.028278978541493416, -0.049137216061353683, 0.04444357007741928, 0.048733390867710114, -0.026441877707839012, -0.004242264200001955, -0.07954271137714386, 0.0505179725587368, 0.05258296802639961, -0.0029849009588360786, -0.012576484121382236, -0.08127453178167343, -0.19878333806991577, -0.008836420252919197, -0.03178541362285614, 0.01954052224755287, -0.0625968798995018, 0.006642122752964497, -0.0567435547709465, -0.016525672748684883, 0.054230038076639175, -0.0026255990378558636, 0.06436029821634293, 0.018976081162691116, -0.008749783039093018, -0.010543838143348694, -0.035224080085754395, -0.06011979281902313, -0.08246591687202454, -0.04723459109663963, 0.014290405437350273, 0.04222101345658302, -0.017521053552627563, -0.014538593590259552, 0.023041311651468277, -0.01675589196383953, 0.028895562514662743, 0.037442341446876526, 0.056936945766210556, 0.026785818859934807, 0.014680597931146622, 0.03893309086561203, 0.008051292970776558, 0.004862263333052397, 0.001427472336217761, -0.226167231798172, 0.07580505311489105, 0.05199430510401726, 0.06416306644678116, -0.008412882685661316, -0.022322528064250946, 0.007685045711696148, -0.016425846144557, -0.0711919367313385, 0.012038810178637505, 0.0036181036848574877, 0.04542553797364235, 0.04890849068760872, -0.023741155862808228, -0.01988648995757103, -0.016997015103697777, -0.015956681221723557, 0.042375385761260986, -0.03172997012734413, -0.020402388647198677, -0.020286664366722107, -0.023685291409492493, -0.019539374858140945, -0.034203119575977325, 0.036455415189266205, -0.021805206313729286, 0.06360165774822235, 0.011384003795683384, -0.06268418580293655, -0.028603630140423775, -0.019798293709754944, 0.016770267859101295, -0.04545459896326065, -0.018434667959809303, 0.029358476400375366, 0.04461836814880371, -0.03277042880654335, 0.2170712947845459, -0.06751005351543427, 0.014097210019826889, -0.04162006080150604, -0.01989067532122135, 0.07716398686170578, -0.06113982945680618, -0.07201974093914032, -0.04684499278664589, -0.04266376420855522, 0.00355996354483068, 0.000562454282771796, 0.008121906779706478, 0.058137379586696625, -0.05274353176355362, 0.07637616246938705, 0.028574662283062935, 0.014837393537163734, 0.008170698769390583, -0.0013826357899233699, 0.0004224526055622846, 0.009150191210210323, 0.032189685851335526, 0.041375741362571716, -0.04949387162923813, 0.014089294709265232, -0.022727375850081444, 0.04546787217259407, 0.12606152892112732, 0.012560836970806122, 0.03057771734893322, 0.04853956028819084, -0.026713494211435318, -0.036631662398576736, -0.0006424119928851724, 0.0005709161632694304, 0.026754798367619514, -0.033853739500045776, -0.01690324768424034, 0.054605383425951004, 0.0011221535969525576, -0.08460831642150879, -0.08809114992618561, 0.0004981354577466846, -0.06682808697223663, -0.027663005515933037, 0.16792424023151398, -0.024999456480145454, 0.0646529495716095, -0.017305178567767143, -0.02479410357773304, -0.014616702683269978, 0.0388711616396904, -0.05611070245504379, -0.02284121699631214, -0.009816932491958141, 0.03915121406316757, 0.06025594845414162, 0.08167603611946106, -0.029610650613904, 0.03404794633388519, -0.029337018728256226, -0.0575125515460968, -0.03272886946797371, 0.0866452306509018, 0.031111912801861763, -0.08617281168699265, -0.024317491799592972, 0.022233126685023308, -0.005383959040045738, -0.02174055390059948, -0.0034723759163171053, 0.021215718239545822, -0.005433931481093168, -0.00013005764049012214, 0.09478488564491272, -0.012172602117061615, -0.0087107690051198, 0.02670891210436821, -0.018927432596683502, 0.010874536819756031, -0.027702786028385162, -0.05041918158531189, -0.06543068587779999, 0.05540543049573898, 0.06466056406497955, -0.05357101187109947, 0.025438854470849037, -0.0788087323307991, 0.029765330255031586, 0.0488022118806839, -0.00863366387784481, -0.0062008569948375225, -0.013672618195414543, -0.021005315706133842, -0.03953306004405022, -0.02761749178171158, -0.024585004895925522, 0.052412018179893494, 0.061452172696590424, -0.08080866932868958, 0.09495777636766434, 0.008818643167614937, -0.010595555417239666, 0.01999945193529129, -0.0047868420369923115, 0.019001971930265427, -0.03185523673892021, -0.03741661459207535, 0.042884573340415955, 0.014398220926523209, -0.008550398983061314, -0.031256332993507385, 0.062213972210884094, -0.01144480425864458, -0.008411365561187267, 0.007951884530484676, -0.002577585633844137, 0.009470430202782154, 0.04189711809158325, 0.08171094208955765, -0.007397446781396866, -0.04593528062105179, -0.08860061317682266, -0.23668842017650604, 0.020279837772250175, -0.0004909938434138894, -0.015612905845046043, -0.020917708054184914, -0.027310295030474663, 0.024442076683044434, -0.025424716994166374, 0.057039692997932434, 0.05303482338786125, 0.07043658941984177, 0.013843556866049767, 0.0010605796705931425, -0.03131770342588425, -0.013936838135123253, 0.07366861402988434, -0.008083437569439411, 0.0027325376868247986, 0.0209087785333395, -0.0016677607782185078, -0.021830426529049873, 0.021335028111934662, -0.056704021990299225, -0.03445107862353325, 0.04930795356631279, -0.010281572118401527, 0.17198821902275085, 0.0462687723338604, 0.03593850135803223, -0.033867791295051575, 0.061669833958148956, 0.03213786333799362, -0.019226964563131332, -0.0733608603477478, 0.028910081833600998, 0.04808112978935242, 0.009951314888894558, 0.023199697956442833, -0.012899704277515411, -0.0018694954924285412, -0.0655382052063942, 0.03883073478937149, 0.017504721879959106, -0.06480706483125687, -0.01783398538827896, -0.036097779870033264, -0.004871642682701349, 0.03794460371136665, -0.0442500077188015, 0.0029892842285335064, 0.047509435564279556, 0.0032119285315275192, 0.056272976100444794, 0.002220784081146121, 0.024385076016187668, -0.05533428490161896, -0.09467523545026779, 0.047345321625471115, -0.020560896024107933, 0.02742178365588188, 0.017166024073958397, -0.033271268010139465, 0.0349765308201313, -0.036238349974155426, 0.01330640260130167, -0.01733413338661194, 0.01575673185288906, -0.02913466840982437, 0.041423115879297256, -0.01344522275030613, -0.0041597033850848675, 0.0900300145149231, -0.07090795785188675, 0.009686603210866451, 0.05996112525463104, 0.023582104593515396, -0.024112431332468987, -0.010103858076035976, 0.02116881124675274, -0.03468906134366989, 0.03930915519595146, -0.04276464506983757, 0.08062698692083359, 0.020795859396457672, 0.0839756652712822, -0.0028798955027014017, 0.04851643368601799, 0.009084171615540981, 0.018443478271365166, -0.0711144506931305, -0.01037487294524908, -0.0058389571495354176, -0.03731426224112511, -0.07139866054058075, 0.05012890696525574, 0.0030626277439296246, -0.29259684681892395, 0.03393566980957985, 0.008316127583384514, 0.002674597082659602, -0.030256764963269234, -0.02622653916478157, -0.008703949861228466, 0.00604224530979991, -0.06171710416674614, 0.014181611128151417, -0.051400791853666306, 0.044456660747528076, -0.010541095398366451, 0.004570988938212395, -0.012281234376132488, 0.05759533867239952, 0.015709737315773964, -0.03636610135436058, 0.017069097608327866, -0.06292969733476639, 0.033560462296009064, 0.030402010306715965, 0.24119813740253448, 0.027134982869029045, 0.022250646725296974, 0.0726364478468895, 0.004840971902012825, 0.05065089091658592, 0.09778328984975815, -0.02465924248099327, 0.012363070622086525, -0.011572649702429771, 0.07480407506227493, -0.021359901875257492, 0.03847880661487579, 0.02840893715620041, -0.06776656210422516, 0.033112671226263046, 0.010360417887568474, -0.003670068457722664, -0.036122407764196396, 0.007566360291093588, -0.011516696773469448, -0.05332234501838684, 0.07817500084638596, -0.054382599890232086, -0.0456690676510334, -0.07574907690286636, 0.012911247089505196, 0.02095181494951248, -0.057987868785858154, 0.002751358086243272, -0.03372838720679283, 0.020907659083604813, 0.024814065545797348, -0.0010206354781985283, -0.0032860334031283855, -0.038105811923742294, -0.028064120560884476, -0.013091545552015305, 0.04094900190830231, -0.0332123301923275, -0.015194610692560673, 0.012037445791065693, 0.02929145283997059 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
Notice the time segments. ![Overlapping time segments][2] The time segments are overlapping by 30 seconds as was defined by the hopSize option. Hopping windows are useful to capture short-term patterns in data. ## Summary By continuously processing data within time windows, you can generate real-time insights and metrics, which can be crucial for applications like monitoring, fraud detection, and operational analytics. Atlas Stream Processing provides both tumbling and hopping window operators. Together these operators enable you to perform various aggregation operations such as sum, average, min, and max over a specific window of data. In this tutorial, you learned how to use both of these operators with solar sample data. ### Learn more about MongoDB Atlas Stream Processing Check out the [MongoDB Atlas Stream Processing announcement blog post. For more on window operators in Atlas Stream Processing, learn more in our documentation.
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.05368148908019066, -0.005898487754166126, 0.042008090764284134, -0.018526144325733185, 0.03428162634372711, 0.00844896025955677, 0.05682070180773735, -0.02843351848423481, 0.022768769413232803, -0.016144035384058952, -0.0005389516591094434, -0.034369248896837234, 0.0018051794031634927, 0.022084517404437065, -0.005454127676784992, 0.0070350924506783485, -0.006777559872716665, 0.017755558714270592, -0.03767511621117592, 0.023188436403870583, 0.018573852255940437, -0.046199776232242584, -0.044362884014844894, -0.04440516605973244, 0.02743902988731861, 0.06231221929192543, -0.055865995585918427, -0.03434208407998085, -0.062387172132730484, -0.22598427534103394, 0.0267280712723732, -0.044666681438684464, 0.02131255529820919, -0.055740490555763245, -0.003705593990162015, -0.022388195618987083, -0.0409974567592144, 0.07961086928844452, -0.04613737761974335, 0.03869558498263359, 0.06877045333385468, 0.026783395558595657, -0.023373093456029892, -0.03720978647470474, -0.06140133738517761, -0.0608488954603672, -0.04254457727074623, 0.0038561266846954823, -0.0029418065678328276, 0.01905127614736557, -0.023774404078722, -0.02919597364962101, 0.04665132611989975, 0.030986761674284935, 0.027640771120786667, 0.033839959651231766, 0.06302883476018906, 0.040174439549446106, 0.04303651303052902, -0.005790116265416145, 0.04575049877166748, -0.0063228607177734375, -0.18204331398010254, 0.05689777806401253, 0.04929555952548981, 0.04472312703728676, 0.015309819020330906, -0.02202737145125866, 0.021323133260011673, 0.0319451242685318, -0.043658364564180374, -0.01740703545510769, -0.010432030074298382, 0.04426063969731331, 0.013142970390617847, 0.001310853403992951, -0.02938978374004364, -0.047328732907772064, -0.01332197617739439, 0.04275226965546608, -0.030048897489905357, -0.03154957666993141, 0.005788106936961412, -0.00528621906414628, -0.0390034094452858, 0.009496107697486877, 0.056109726428985596, -0.043081432580947876, 0.029201066121459007, 0.0023746222723275423, -0.0020423580426722765, -0.015098393894731998, -0.015956897288560867, 0.03459690883755684, -0.03658277541399002, -0.00894794799387455, 0.03534569963812828, 0.03811643272638321, 0.026207182556390762, 0.22624483704566956, -0.04557861387729645, 0.0819961279630661, 0.03489343076944351, -0.025412939488887787, 0.027353685349225998, -0.05131077766418457, -0.035244639962911606, -0.0054081338457763195, -0.03804178163409233, 0.018603498116135597, -0.0089567881077528, -0.030094880610704422, 0.05872389301657677, -0.048493802547454834, 0.015228284522891045, 0.015067246742546558, 0.007772263139486313, 0.009069377556443214, -0.02210286632180214, 0.05813685432076454, -0.03340226039290428, -0.0017491440521553159, 0.07742634415626526, -0.0185628030449152, 0.004227386321872473, -0.04740158095955849, 0.05810944363474846, 0.0985773503780365, 0.0032567044254392385, 0.0483083501458168, 0.04632212221622467, -0.03446332365274429, -0.05840583145618439, 0.002822744892910123, -0.015297290869057178, -0.01773984171450138, -0.016497023403644562, 0.02217724733054638, -0.002592245116829872, -0.012711890041828156, -0.052977241575717926, -0.029689593240618706, 0.03496183827519417, -0.11169087141752243, -0.007273328490555286, 0.13851183652877808, -0.05567490682005882, 0.04619937762618065, -0.05193326622247696, -0.03185040503740311, -0.02967415191233158, 0.032151322811841965, -0.06078279763460159, -0.053105827420949936, 0.0032529637683182955, 0.031814008951187134, 0.052328068763017654, 0.08457814902067184, -0.05875694751739502, 0.03999790549278259, -0.049332112073898315, -0.03376526013016701, 0.001641821232624352, 0.07614343613386154, 0.04120625555515289, -0.1029907688498497, -0.00145086704287678, 0.013879760168492794, -0.008115355856716633, -0.019995450973510742, 0.005281219724565744, 0.014688496477901936, -0.023301048204302788, -0.014811504632234573, 0.0977214127779007, 0.012679722160100937, -0.06994382292032242, 0.010067285969853401, 0.005215757060796022, 0.012151814065873623, 0.05622471123933792, -0.04422212392091751, -0.029478849843144417, 0.019519545137882233, 0.05775555968284607, -0.028313826769590378, -0.004747558385133743, -0.022949371486902237, 0.013851705007255077, 0.04254615306854248, -0.06191922351717949, -0.022158149629831314, 0.01637858711183071, -0.03078380599617958, -0.030062846839427948, -0.055926963686943054, 0.008201781660318375, -0.018591437488794327, 0.0032464421819895506, -0.01781013235449791, 0.07012055814266205, 0.009729762561619282, -0.012300682254135609, 0.03582475706934929, 0.05835796520113945, -0.005997657310217619, -0.040332429111003876, -0.023263590410351753, 0.01841232180595398, -0.01937975361943245, -0.024436188861727715, -0.03727242723107338, 0.013003597036004066, -0.01623181626200676, -0.00020984352158848196, -0.01882917806506157, 0.018806584179401398, 0.004383677151054144, -0.018584003672003746, 0.0568123497068882, -0.009371856227517128, -0.061556290835142136, -0.06796237081289291, -0.25662851333618164, 0.020175151526927948, 0.005862778518348932, 0.04101582244038582, 0.007911501452326775, -0.03412086144089699, 0.026023821905255318, -0.03662523254752159, 0.0249042846262455, 0.0335109643638134, 0.04468492045998573, 0.007165108807384968, 0.01122939120978117, -0.027108080685138702, -0.013154346495866776, 0.1011861115694046, 0.012247640639543533, 0.0485973060131073, -0.046671997755765915, -0.005758584011346102, -0.006339073646813631, 0.05106481909751892, -0.013949720188975334, -0.07606717199087143, 0.041053250432014465, 0.007570168934762478, 0.19269481301307678, 0.03443186357617378, 0.04189083352684975, -0.040298961102962494, 0.07445621490478516, 0.016207031905651093, -0.020160894840955734, -0.07625825703144073, 0.04804498329758644, 0.06679043173789978, 0.027043340727686882, 0.00824101734906435, -0.010431013070046902, -0.03077593259513378, -0.07951606065034866, 0.03130378574132919, 0.03173118084669113, -0.107867531478405, -0.01963663473725319, -0.02196474000811577, -0.008029422722756863, 0.008648662827908993, -0.02632233127951622, -0.036534395068883896, 0.0024934762623161077, -0.036123767495155334, 0.04840650036931038, 0.004180318675935268, 0.009810558520257473, -0.059506576508283615, -0.07553290575742722, 0.05105091631412506, -0.04661185294389725, 0.02667674422264099, 0.02258589304983616, -0.03618334233760834, 0.043104927986860275, -0.01553670596331358, 0.0397305004298687, -0.006925011519342661, -0.00033843074925243855, -0.021621249616146088, 0.004831735976040363, -0.005130356643348932, -0.010705150663852692, 0.10278871655464172, -0.05015600100159645, -0.015669411048293114, 0.027570975944399834, 0.02472340688109398, 0.009903528727591038, -0.00045412126928567886, 0.0011086794547736645, -0.006747188046574593, 0.018904466181993484, -0.04702458530664444, 0.03007413260638714, 0.04559393227100372, 0.05605204775929451, 0.003672531107440591, 0.05828471481800079, -0.02098710834980011, -0.007411951199173927, -0.02494552545249462, 0.022937441244721413, 0.0014758234610781074, -0.06638510525226593, -0.058802854269742966, -0.011773606762290001, 0.025596817955374718, -0.29121071100234985, 0.06199643388390541, -0.009038870222866535, -0.0020429508294910192, -0.0050833625718951225, -0.022469831630587578, 0.04454199597239494, 0.04567321017384529, -0.007480895146727562, -0.007034303154796362, -0.02819034457206726, 0.06018908694386482, 0.01810891553759575, -0.0273149311542511, 0.02236846834421158, 0.0824570432305336, 0.06310053914785385, -0.040306754410266876, 0.009351401589810848, -0.05205400660634041, 0.07875031977891922, 0.014131786301732063, 0.27150046825408936, -0.0020104977302253246, 0.041855234652757645, 0.038588616997003555, 0.0034265276044607162, 0.01814398542046547, 0.01442943699657917, -0.01321843545883894, 0.014331664890050888, 0.007794130127876997, 0.12619411945343018, -0.02456602454185486, 0.02708696760237217, 0.04785468801856041, -0.023201486095786095, 0.056285541504621506, 0.04045180231332779, -0.039572667330503464, -0.02712452970445156, 0.028595171868801117, -0.004191168118268251, -0.021517829969525337, 0.09225331991910934, -0.03619309514760971, -0.025074414908885956, -0.11293686926364899, -0.012871756218373775, 0.034410521388053894, -0.07014743983745575, -0.01801866665482521, -0.027600804343819618, 0.012241167016327381, 0.022868143394589424, 0.014390675351023674, -0.05329295992851257, -0.02372410148382187, -0.029783129692077637, 0.014409790746867657, 0.024751784279942513, -0.09599340707063675, -0.009694994427263737, -0.0016347059281542897, -0.003688535885885358 ]
devcenter
https://www.mongodb.com/developer/products/atlas/exploring-window-operators-atlas-stream-processing
created
>Log in today to get started. Atlas Stream Processing is available to all developers in Atlas. Give it a try today! [1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt73ff54f0367cad3b/650da3ef69060a5678fc1242/image1.jpg [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt833bc1a824472d14/650da41aa5f15dea3afc5b55/image3.jpg
md
{ "tags": [ "Atlas" ], "pageDescription": "Learn how to use the various window operators such as tumbling window and hopping window with MongoDB Atlas Stream Processing.", "contentType": "Tutorial" }
Exploring Window Operators in Atlas Stream Processing
2024-05-20T17:32:23.500Z
[ -0.011378276161849499, -0.01672467216849327, 0.020003018900752068, -0.040189094841480255, -0.008565499447286129, 0.010022525675594807, -0.00259906193241477, -0.0034882749896496534, -0.019957955926656723, -0.04163186252117157, 0.029949022457003593, -0.08186767995357513, -0.024198634549975395, -0.0025164252147078514, 0.002207045676186681, -0.006065156776458025, -0.004182700999081135, 0.014160268940031528, -0.04776882380247116, 0.018706418573856354, 0.0032389736734330654, -0.04197477176785469, -0.02686428651213646, -0.0873502790927887, -0.01112767867743969, 0.0031297102104872465, -0.057276636362075806, -0.0529458187520504, -0.06424762308597565, -0.22692306339740753, 0.01116950809955597, -0.0655493289232254, 0.04669607803225517, -0.07860326766967773, 0.003679086687043309, -0.03929261863231659, -0.028292398899793625, 0.05184028670191765, -0.041568540036678314, -0.001482111751101911, 0.06769103556871414, 0.04524294286966324, -0.04107728973031044, -0.03064069338142872, -0.053487133234739304, -0.07139316946268082, -0.0005204827757552266, 0.02169901691377163, 0.020388899371027946, 0.009268040768802166, -0.027061888948082924, -0.05260319262742996, 0.04236970096826553, 0.0003040758310817182, 0.006076596677303314, 0.046052537858486176, 0.03897901251912117, 0.07611043006181717, 0.03836238756775856, 0.03138300031423569, 0.013532779179513454, 0.018617240712046623, -0.2034890055656433, 0.08725196868181229, 0.014772745780646801, 0.05872636288404465, -0.00907628983259201, -0.013927552849054337, 0.028885606676340103, -0.00678673991933465, -0.07480701804161072, 0.02350439876317978, 0.01589956134557724, 0.04468771815299988, 0.0036813924089074135, 0.014264090918004513, -0.02278924360871315, -0.0034718732349574566, -0.03137946128845215, 0.009378544054925442, -0.01534986775368452, -0.0034885695204138756, 0.0016982614761218429, 0.01742168329656124, -0.042826130986213684, 0.05356472358107567, 0.012382982298731804, -0.005991724785417318, 0.0509757436811924, -0.017328452318906784, -0.022186681628227234, -0.008199651725590229, -0.011473172344267368, 0.059535156935453415, -0.06701544672250748, -0.033509448170661926, 0.05222253501415253, 0.04573792591691017, 0.022026503458619118, 0.22929920256137848, -0.03951745480298996, 0.045456383377313614, 0.07529610395431519, -0.03628050908446312, 0.045114971697330475, -0.02271098643541336, -0.027768591418862343, 0.01866980455815792, -0.044866662472486496, 0.0058669219724833965, 0.009623883292078972, -0.01401739101856947, 0.059016965329647064, -0.04515528306365013, 0.03575781732797623, 0.022255007177591324, 0.028285035863518715, 0.02282201126217842, -0.025490932166576385, 0.018737778067588806, 0.017840050160884857, 0.024155862629413605, 0.05138544738292694, -0.020749012008309364, 0.021602166816592216, -0.020190592855215073, 0.058996107429265976, 0.11638860404491425, 0.025238577276468277, 0.009009528905153275, 0.04454546794295311, 0.0006705617415718734, -0.05967668816447258, -0.0029601401183754206, 0.022745970636606216, 0.012687327340245247, -0.014987346716225147, -0.023218462243676186, -0.051265131682157516, 0.005926935933530331, -0.04829062148928642, -0.04636214300990105, 0.007098219823092222, -0.11119545996189117, 0.004885014612227678, 0.12533816695213318, -0.066892609000206, 0.042647961527109146, -0.08723945170640945, -0.036499205976724625, 0.008707279339432716, 0.012568331323564053, -0.07621904462575912, -0.008270185440778732, 0.004325796850025654, -0.014587809331715107, 0.026328403502702713, 0.06921450793743134, -0.041050996631383896, 0.010979371145367622, -0.03190286085009575, -0.0632544457912445, -0.06146315857768059, 0.07661505043506622, 0.009617176838219166, -0.09355073422193527, -0.014026290737092495, -0.02191697619855404, 0.020854881033301353, 0.006712246220558882, -0.028794249519705772, 0.02101917751133442, -0.005597500130534172, -0.026262059807777405, 0.08235267549753189, 0.012749165296554565, -0.048177238553762436, -0.022273115813732147, 0.012331483885645866, 0.0279361754655838, 0.04924498125910759, -0.05656511336565018, -0.028230741620063782, 0.013423939235508442, -0.0037753665819764137, -0.05362269654870033, -0.020276473835110664, -0.035983022302389145, 0.024543648585677147, 0.0356438122689724, -0.038437336683273315, 0.01882137916982174, 0.019988082349300385, -0.05834921821951866, -0.033139344304800034, -0.02928774617612362, 0.008200732059776783, -0.009688792750239372, -0.013141154311597347, -0.0463041216135025, 0.11299090832471848, 0.036851655691862106, -0.012315263040363789, 0.06015271320939064, 0.004545092582702637, 0.021964967250823975, -0.055151596665382385, -0.02287140302360058, 0.01960144191980362, 0.025264834985136986, -0.03164814040064812, -0.001314643770456314, 0.06378915905952454, -0.02571851573884487, 0.019400203600525856, 0.013866635970771313, 0.026341751217842102, 0.053871531039476395, -0.002224971307441592, 0.04433128982782364, 0.03155776485800743, -0.09138417989015579, -0.06272478401660919, -0.23078176379203796, 0.04518319293856621, 0.038620706647634506, -0.011316986754536629, -0.020872775465250015, -0.07864085584878922, 0.016140710562467575, -0.028055407106876373, -0.003134956816211343, 0.08270665258169174, 0.06726491451263428, 0.017088228836655617, 0.005782576743513346, -0.020691290497779846, 0.015697898343205452, 0.0570220984518528, 0.017653580754995346, 0.05229458585381508, -0.017861904576420784, -0.008271334692835808, 0.013357278890907764, 0.015224145725369453, 0.00672587426379323, -0.07135926932096481, 0.07133907079696655, 0.016238372772932053, 0.20174726843833923, 0.06710702925920486, 0.046301133930683136, -0.0479719340801239, 0.051607225090265274, 0.025382623076438904, 0.0014850932639092207, -0.12206375598907471, 0.0361357145011425, 0.06917187571525574, 0.011097703129053116, 0.025021810084581375, 0.011625383049249649, -0.04224998131394386, -0.06303758919239044, 0.03474322706460953, 0.003369528567418456, -0.12120869755744934, -0.007266595959663391, -0.011287006549537182, -0.05019073560833931, 0.002344732638448477, -0.07514528185129166, 0.031357746571302414, 0.04592705890536308, -0.01823566108942032, 0.017550023272633553, 0.02728518284857273, -0.022951997816562653, -0.05034538730978966, -0.05394833907485008, 0.03842958062887192, -0.03254854306578636, 0.048167742788791656, -0.011921003460884094, -0.023074310272932053, -0.003844114253297448, -0.028421951457858086, 0.062098193913698196, -0.017271576449275017, -0.017597608268260956, -0.03507521003484726, 0.04568975418806076, -0.020054280757904053, 0.0014612512895837426, 0.06929202377796173, -0.03115161508321762, -0.0032573051284998655, 0.04638209193944931, 0.028688156977295876, 0.021313287317752838, 0.0092685641720891, 0.027104344218969345, -0.03855675086379051, 0.032065875828266144, -0.0479453019797802, 0.054680049419403076, 0.02528461441397667, 0.04639176279306412, 0.06135772913694382, 0.015389516949653625, -0.02253805473446846, 0.0016563805984333158, -0.02706461027264595, 0.01669204607605934, -0.002647771267220378, -0.035563185811042786, -0.057309869676828384, 0.04558459669351578, 0.01964624598622322, -0.2924315929412842, 0.029105480760335922, -0.0016512542497366667, 0.004716253373771906, -0.0402420274913311, -0.011546491645276546, 0.03959627076983452, 0.05664455518126488, -0.04366597905755043, 0.018718188628554344, 0.032329998910427094, 0.045765604823827744, 0.014929701574146748, -0.00608838489279151, 0.03389520198106766, 0.06220434978604317, 0.047268953174352646, -0.05239521712064743, 0.040670040994882584, -0.05164261534810066, 0.03165818378329277, 0.01835368573665619, 0.22842445969581604, -0.017979880794882774, 0.017404820770025253, 0.04752596095204353, -0.012850357219576836, 0.02862779051065445, 0.04298470541834831, 0.007454973645508289, 0.003835982410237193, 0.004592120181769133, 0.08407735079526901, -0.020510710775852203, 0.05865819379687309, 0.06507087498903275, -0.025007344782352448, 0.013919823803007603, 0.04240363463759422, -0.05205704644322395, -0.013163389638066292, 0.04752688854932785, 0.0019269408658146858, 0.02484838292002678, 0.06838097423315048, -0.016847211867570877, -0.014750516973435879, -0.06495872884988785, -0.03492383286356926, 0.019273411482572556, -0.03942308947443962, -0.013958537951111794, 0.002773435553535819, 0.009523042477667332, -0.02364444173872471, 0.03257794305682182, -0.038826219737529755, -0.03544678911566734, -0.03821537271142006, -0.012009809724986553, 0.031057298183441162, -0.11223118752241135, 0.03581937775015831, 0.013797934167087078, -0.02767481654882431 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
# Getting Started with MongoDB and FastAPI FastAPI is a modern, high-performance, easy-to-learn, fast-to-code, production-ready, Python 3.6+ framework for building APIs based on standard Python type hints. While it might not be as established as some other Python frameworks such as Django, it is already in production at companies such as Uber, Netflix, and Microsoft. FastAPI is async, and as its name implies, it is super fast; so, MongoDB is the perfect accompaniment. In this quick start, we will create a CRUD (Create, Read, Update, Delete) app showing how you can integrate MongoDB with your FastAPI projects. ## Prerequisites - Python 3.9.0 - A MongoDB Atlas cluster. Follow the "Get Started with Atlas" guide to create your account and MongoDB cluster. Keep a note of your username, password, and connection string as you will need those later.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.08094657212495804, -0.01399584487080574, -0.01831529662013054, -0.00742050725966692, 0.025800786912441254, -0.028907081112265587, 0.0032158594112843275, -0.021332303062081337, -0.0046873935498297215, -0.0030043884180486202, 0.03144683688879013, -0.0724397674202919, 0.037368737161159515, 0.03018716536462307, -0.020412353798747063, -0.008385245688259602, 0.00337994541041553, -0.025762390345335007, -0.03272180259227753, 0.029673809185624123, 0.017490483820438385, -0.01025362964719534, -0.041525665670633316, -0.07380195707082748, 0.013911193236708641, 0.07987357676029205, -0.032139088958501816, -0.04426749423146248, -0.036135803908109665, -0.19378259778022766, 0.004663689993321896, -0.0621904619038105, 0.06971026211977005, -0.0615634061396122, 0.019772415980696678, 0.01453323196619749, -0.01962958835065365, 0.07160530239343643, -0.04412909224629402, 0.02842964604496956, 0.07296266406774521, 0.046397510915994644, -0.030552223324775696, -0.03817044571042061, -0.032906144857406616, -0.04035162553191185, -0.021423954516649246, 0.02394089661538601, 0.005026109050959349, -0.07223715633153915, -0.013587110675871372, -0.04301859065890312, -0.013942415826022625, 0.017292145639657974, 0.028594696894288063, 0.04117988422513008, 0.029950493946671486, 0.06288909167051315, 0.0019335432443767786, 0.012176492251455784, 0.049662861973047256, 0.03050367347896099, -0.1645832061767578, 0.09688930958509445, 0.029084930196404457, 0.07713689655065536, -0.02890203148126602, -0.029981590807437897, 0.027361415326595306, 0.022236831486225128, -0.09438220411539078, 0.025979887694120407, 0.009122841991484165, 0.07489211857318878, 0.0073120566084980965, -0.026770533993840218, 0.03257567062973976, -0.05943945422768593, 0.042219728231430054, 0.03305694833397865, -0.02328275702893734, -0.025840597227215767, -0.03374938294291496, -0.006598923821002245, -0.028999391943216324, -0.03859682008624077, 0.029123390093445778, -0.01646674983203411, 0.02407280169427395, -0.008467210456728935, -0.0054838224314153194, -0.028041530400514603, 0.021650142967700958, 0.04372164607048035, -0.054243091493844986, 0.010064954869449139, 0.03550003096461296, 0.03273361548781395, -0.04374835640192032, 0.24974851310253143, -0.04602852463722229, 0.04516728222370148, 0.01815907657146454, 0.0020369344856590033, 0.021092792972922325, -0.03227117285132408, -0.0052603138610720634, -0.062388401478528976, -0.0012200921773910522, -0.028758957982063293, 0.022756895050406456, -0.033371951431035995, 0.019791150465607643, -0.08026828616857529, 0.03237880766391754, 0.021263757720589638, -0.004152557346969843, 0.04477762430906296, -0.03790788725018501, 0.011132299900054932, 0.015868818387389183, 0.04885045066475868, 0.03725403547286987, -0.0008430253947153687, 0.014410296455025673, -0.03319999948143959, 0.03023700788617134, 0.09603127092123032, 0.007437931839376688, 0.06424889713525772, 0.057485874742269516, 0.012217294424772263, -0.08080743253231049, -0.0017608063062652946, 0.03993219882249832, 0.0050948685966432095, 0.0054638804867863655, -0.0034715812653303146, 0.00033674779115244746, 0.005126747768372297, -0.05454964563250542, -0.11007790267467499, -0.014940901659429073, -0.09520409256219864, -0.007203954737633467, 0.11737868189811707, -0.028683729469776154, 0.08308953046798706, -0.08318792283535004, -0.018793953582644463, -0.00044234725646674633, 0.02066359855234623, -0.06291650980710983, -0.030611706897616386, -0.006924742367118597, 0.0019563594833016396, 0.06934619694948196, 0.05612652748823166, -0.002809930359944701, 0.004054805729538202, -0.06137966364622116, -0.03824818506836891, -0.046647995710372925, 0.06429034471511841, 0.016926346346735954, -0.16153471171855927, -0.0003761494008358568, 0.02132425270974636, -0.012255425564944744, -0.015311172232031822, -0.0004318366991356015, 0.043715011328458786, -0.04632730782032013, 0.01739097200334072, 0.09124089777469635, -0.0008154867682605982, -0.05582204833626747, -0.01401460636407137, 0.030704136937856674, 0.005588384345173836, -0.010809523053467274, -0.03936723619699478, -0.06270579248666763, 0.024024995043873787, -0.0024219199549406767, -0.06672849506139755, -0.025999993085861206, -0.0329178087413311, 0.03611915186047554, 0.022515147924423218, -0.0062082442454993725, 0.013470890000462532, -0.040120434015989304, -0.011862304992973804, -0.02537599392235279, -0.04150507226586342, -0.0024364590644836426, -0.009296245872974396, 0.032590102404356, -0.03541221469640732, 0.027208954095840454, 0.05564252287149429, -0.024945545941591263, 0.06796049326658249, -0.02768535166978836, 0.0038484185934066772, -0.034991856664419174, -0.040433403104543686, 0.04185287281870842, -0.009240646846592426, -0.036353833973407745, -0.0014550439082086086, 0.04181361198425293, -0.005711291916668415, -0.04859422147274017, -0.008667332120239735, 0.0065606581047177315, 0.03934360668063164, 0.006215792614966631, 0.06012793257832527, 0.003067383309826255, -0.1027095839381218, -0.04301590099930763, -0.2373473197221756, 0.0668286457657814, -0.009033292531967163, 0.017460083588957787, -0.005929234437644482, -0.05276980251073837, 0.03548309579491615, -0.03941816836595535, -0.002291993238031864, 0.06885867565870285, 0.09160560369491577, -0.01981520466506481, 0.0308060385286808, 0.015944208949804306, -0.02766990102827549, 0.09164112061262131, 0.008685286156833172, 0.0018609826220199466, -0.023949917405843735, -0.012384317815303802, 0.013158558867871761, -0.011534377932548523, -0.017360195517539978, -0.07951477915048599, 0.015238589607179165, -0.002466881647706032, 0.2255195677280426, 0.00585381081327796, 0.017867207527160645, -0.0618351586163044, 0.05714653804898262, 0.0027361558750271797, -0.03697134926915169, -0.15991906821727753, 0.014624878764152527, 0.05364703759551048, 0.038579877465963364, 0.019998423755168915, -0.023286662995815277, -0.036837633699178696, -0.028953054919838905, 0.06073499843478203, 0.038982272148132324, -0.08295941352844238, -0.010913563892245293, -0.01680038310587406, -0.030362756922841072, 0.0000693526744726114, -0.0244987104088068, 0.037097327411174774, -0.0061907158233225346, 0.04293440654873848, 0.03436243161559105, 0.03161897882819176, -0.04906098544597626, -0.02536991983652115, -0.0790010392665863, 0.03306201100349426, -0.04145482927560806, 0.042175378650426865, -0.007950804196298122, -0.06902120262384415, 0.005965015850961208, -0.03583799675107002, 0.030236564576625824, -0.03422601893544197, -0.032717619091272354, -0.03587771952152252, 0.045574553310871124, -0.04605989158153534, -0.005137213505804539, 0.08887699246406555, -0.0379621647298336, 0.0151089271530509, 0.046209510415792465, -0.007884322665631771, 0.038111861795186996, -0.0002251059195259586, 0.028733892366290092, -0.010658175684511662, 0.02753639779984951, 0.003347414545714855, 0.027791624888777733, 0.031547918915748596, 0.05553809553384781, 0.030028948560357094, 0.08670397102832794, -0.01619192585349083, -0.0018286778358742595, -0.01831059716641903, 0.004319619853049517, 0.026330294087529182, -0.03143725171685219, -0.027015358209609985, 0.02316942624747753, 0.01701376773416996, -0.277387797832489, 0.05205438658595085, -0.02789883315563202, 0.021961215883493423, 0.00995714496821165, 0.03402809053659439, 0.05529070273041725, 0.01358181331306696, -0.015291575342416763, 0.023306317627429962, 0.02872183918952942, 0.03408223018050194, 0.03863019868731499, 0.018161552026867867, -0.0010617800289765, 0.05433409661054611, 0.06134917587041855, -0.03396470099687576, 0.02082107402384281, -0.021497579291462898, 0.016659045591950417, 0.012202449142932892, 0.21159926056861877, 0.015694953501224518, 0.03162478655576706, 0.06401192396879196, 0.027330199256539345, 0.015527484938502312, 0.043452125042676926, 0.008665675297379494, -0.00681661069393158, -0.013100777752697468, 0.0735456794500351, -0.029500121250748634, 0.052359145134687424, 0.05056395009160042, -0.02180662751197815, 0.034529782831668854, 0.014939123764634132, -0.02778182365000248, -0.015148721635341644, 0.059309836477041245, -0.01618422195315361, 0.018143272027373314, 0.07128062844276428, -0.04143605753779411, -0.03620455041527748, -0.0992523729801178, -0.0010247972095385194, 0.027894973754882812, -0.0397515632212162, -0.08066220581531525, -0.030748937278985977, -0.018944013863801956, 0.017156044021248817, 0.002208881778642535, 0.03125057369470596, 0.018070269376039505, -0.03445764631032944, -0.024719566106796265, 0.02716437727212906, -0.07674150168895721, 0.004263121169060469, 0.05012822151184082, 0.012540016323328018 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
## Running the Example To begin, you should clone the example code from GitHub. ``` shell git clone [email protected]:mongodb-developer/mongodb-with-fastapi.git ``` You will need to install a few dependencies: FastAPI, Motor, etc. I always recommend that you install all Python dependencies in a virtualenv for the project. Before running pip, ensure your virtualenv is active. ``` shell cd mongodb-with-fastapi pip install -r requirements.txt ``` It may take a few moments to download and install your dependencies. This is normal, especially if you have not installed a particular package before. Once you have installed the dependencies, you need to create an environment variable for your MongoDB connection string. ``` shell export MONGODB_URL="mongodb+srv://:@/?retryWrites=true&w=majority" ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.06842947006225586, -0.01364817377179861, 0.013708416372537613, -0.04137702286243439, 0.032189372926950455, -0.06256020069122314, -0.013447193428874016, -0.007026028353720903, -0.014803295955061913, -0.010356332175433636, 0.007446484174579382, -0.07129909843206406, 0.040027979761362076, 0.013055621646344662, -0.011305258609354496, 0.012081543914973736, 0.0035907661076635122, -0.002443899167701602, -0.02729286067187786, 0.030208976939320564, -0.001247314503416419, -0.04032362997531891, -0.03755955770611763, -0.0746249258518219, 0.016819898039102554, 0.07529380172491074, 0.005113764200359583, -0.05121610686182976, -0.0141860106959939, -0.21144889295101166, -0.008508396334946156, -0.0520111620426178, 0.02347882278263569, -0.038868486881256104, 0.04872749745845795, 0.02376711554825306, -0.02243397757411003, 0.072691410779953, -0.04979267716407776, 0.05251174047589302, 0.061633072793483734, 0.01329332496970892, -0.024344399571418762, -0.04445008561015129, -0.027884263545274734, -0.041301339864730835, -0.027638154104351997, -0.017893318086862564, 0.042265743017196655, -0.07696070522069931, 0.015565081499516964, -0.03573330491781235, -0.04514884203672409, -0.0075201899744570255, 0.011918576434254646, 0.040634576231241226, 0.0426122285425663, 0.06234874576330185, 0.01732731983065605, -0.004242859315127134, 0.051221415400505066, 0.04109411686658859, -0.19478902220726013, 0.08457036316394806, 0.06158335134387016, 0.087498240172863, -0.020349809899926186, -0.014880381524562836, 0.04519237205386162, 0.014772958122193813, -0.10923922806978226, 0.009295900352299213, 0.02840736135840416, 0.094003826379776, 0.0005398979410529137, -0.04948985204100609, 0.00045832787873223424, -0.05022924393415451, 0.0284257885068655, 0.03578571975231171, -0.011461740359663963, -0.013756264932453632, -0.03345095366239548, 0.012694736011326313, -0.023007525131106377, -0.05028017610311508, 0.03236822783946991, -0.006910332944244146, 0.03991425037384033, 0.00534413568675518, -0.00013902811042498797, -0.040106162428855896, 0.03536089137196541, 0.0024514063261449337, -0.06662587821483612, 0.041279107332229614, 0.05523672327399254, -0.010629639960825443, -0.029587553814053535, 0.2332817167043686, -0.04444769397377968, 0.030064541846513748, -0.02153688482940197, 0.014694086275994778, 0.0505569763481617, -0.01933681033551693, -0.007327467203140259, -0.04175133630633354, 0.020537765696644783, -0.036656808108091354, 0.005361262243241072, -0.038329437375068665, 0.02708251029253006, -0.08508006483316422, 0.030569355934858322, 0.008155567571520805, -0.04819542542099953, 0.04530581831932068, -0.06378350406885147, 0.025335127487778664, 0.0068655554205179214, 0.022867389023303986, 0.03868072107434273, 0.019566671922802925, 0.028772611171007156, -0.02755357138812542, 0.0579165555536747, 0.0771455243229866, -0.005187326576560736, 0.07579322904348373, 0.034422583878040314, 0.009835044853389263, -0.06036916375160217, -0.01838729716837406, 0.015562441200017929, 0.02310703508555889, 0.009040062315762043, 0.00928253959864378, 0.01313350535929203, -0.002828712575137615, 0.0024194526486098766, -0.09463392198085785, -0.021107854321599007, -0.08957353234291077, -0.019674310460686684, 0.08442817628383636, -0.027521146461367607, 0.10872981697320938, -0.08783543854951859, -0.03259354829788208, 0.012991467490792274, 0.011282763443887234, -0.04073714464902878, -0.032169442623853683, -0.00834093987941742, 0.030738696455955505, 0.040388427674770355, 0.09363018721342087, -0.008663326501846313, -0.001486803637817502, -0.045899972319602966, -0.045758794993162155, -0.025843540206551552, 0.06330454349517822, 0.024027477949857712, -0.09526456147432327, -0.00909604225307703, 0.001287153922021389, 0.005648678168654442, -0.0035976427607238293, 0.0015281285159289837, 0.012470497749745846, -0.048186417669057846, 0.0011443691328167915, 0.08086872845888138, -0.0042518130503594875, -0.03127242624759674, -0.007990904152393341, 0.03493629768490791, 0.03060656413435936, 0.0013740501599386334, -0.02992585115134716, -0.056686192750930786, 0.03461689502000809, 0.016772011294960976, -0.07459063082933426, -0.01765184849500656, -0.03301089257001877, 0.02245960384607315, 0.047873906791210175, -0.010401656851172447, 0.029821792617440224, -0.02959117293357849, -0.008268101140856743, -0.013432187028229237, -0.037705980241298676, -0.027462828904390335, -0.02544051967561245, 0.004544810391962528, -0.05074923485517502, 0.058079272508621216, 0.020211251452565193, 0.0062906211242079735, 0.04075263813138008, -0.07112915813922882, 0.002816289197653532, -0.019460979849100113, -0.025299767032265663, 0.018974710255861282, 0.007001691963523626, -0.051094166934490204, 0.016938714310526848, 0.05404648929834366, -0.0022146052215248346, -0.058411650359630585, 0.007490223273634911, -0.013945091515779495, 0.05187218263745308, 0.0627998486161232, 0.06476088613271713, 0.002176709473133087, -0.07173929363489151, -0.04626725614070892, -0.25412243604660034, 0.029885655269026756, 0.0075987279415130615, 0.017849549651145935, 0.057080551981925964, -0.0521991066634655, 0.0302205141633749, -0.04081178829073906, -0.028192806988954544, 0.03894190117716789, 0.11301670223474503, -0.061609361320734024, 0.02057112753391266, 0.015392092056572437, -0.03268192335963249, 0.0740385353565216, -0.003089355304837227, -0.0020874422043561935, -0.013328871689736843, -0.018239451572299004, 0.01277286559343338, -0.005125482566654682, -0.01886224001646042, -0.06591566652059555, 0.040621425956487656, -0.0013063723454251885, 0.20866107940673828, 0.03635309264063835, 0.016669193282723427, -0.06101878359913826, 0.047130074352025986, -0.000788429519161582, -0.022834986448287964, -0.18871758878231049, 0.02698551118373871, 0.03574012964963913, 0.018676988780498505, 0.04592139646410942, 0.0015532684046775103, -0.015352384187281132, -0.01178261823952198, 0.049518514424562454, 0.0544813796877861, -0.06463209539651871, -0.007675939705222845, -0.024401826784014702, -0.046970434486866, 0.010400627739727497, -0.04962136596441269, -0.0011382795637473464, -0.008475386537611485, 0.047728732228279114, 0.041796550154685974, 0.026332158595323563, -0.03999653086066246, -0.02598416432738304, -0.06756962090730667, 0.024956680834293365, -0.014706995338201523, 0.04107961803674698, -0.003952586092054844, -0.05411631986498833, 0.04127661511301994, -0.04722556099295616, 0.013652676716446877, -0.01873360015451908, -0.016248026862740517, -0.020473172888159752, 0.047325775027275085, -0.0215146467089653, -0.0077323876321315765, 0.07779455929994583, -0.043773140758275986, 0.05514194816350937, 0.02860448695719242, 0.016568144783377647, -0.004258465021848679, 0.005717501509934664, -0.003388738026842475, -0.014932296238839626, 0.03138970211148262, -0.028108440339565277, 0.02827136218547821, 0.020411156117916107, 0.03927144780755043, 0.020945196971297264, 0.08671824634075165, -0.015191465616226196, 0.006429025437682867, 0.03890190273523331, -0.016038548201322556, -0.012046873569488525, -0.02779999189078808, 0.0012427486944943666, 0.012512716464698315, 0.006157700438052416, -0.27585503458976746, 0.056014008820056915, -0.012936870567500591, 0.028795072808861732, 0.003152411198243499, 0.04240824654698372, 0.0454697348177433, -0.004982198588550091, -0.023173043504357338, 0.016416575759649277, 0.012957809492945671, 0.003097442677244544, 0.053874846547842026, 0.01395560335367918, 0.006616279948502779, 0.05869318172335625, 0.044535890221595764, -0.05193118751049042, 0.033886391669511795, -0.049642108380794525, 0.006024024449288845, 0.03309619054198265, 0.1979845017194748, 0.011058532632887363, 0.04534211754798889, 0.05536871775984764, -0.0027883530128747225, 0.005026500206440687, 0.035059407353401184, 0.013151123188436031, 0.008472742512822151, -0.0036129429936408997, 0.08049263060092926, -0.0503753237426281, 0.030065856873989105, 0.0681285709142685, -0.024787211790680885, 0.0348035953938961, 0.00872812606394291, -0.03776973485946655, -0.03438057377934456, 0.04462472349405289, -0.02031766250729561, -0.007311192341148853, 0.09343739598989487, -0.0648668184876442, -0.027995558455586433, -0.13347889482975006, -0.017259923741221428, 0.022741051390767097, -0.048797182738780975, -0.07325763255357742, 0.0026363786309957504, -0.01872241124510765, 0.054204367101192474, 0.0049247536808252335, 0.012106023728847504, 0.04119087755680084, -0.018651042133569717, -0.02184637077152729, 0.023220429196953773, -0.0838332548737526, 0.03095460683107376, 0.030993366613984108, 0.014236404560506344 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
``` shell export MONGODB_URL="mongodb+srv://:@/?retryWrites=true&w=majority" ``` Remember, anytime you start a new terminal session, you will need to set this environment variable again. I use direnv to make this process easier. The final step is to start your FastAPI server. ``` shell uvicorn app:app --reload ``` Once the application has started, you can view it in your browser at . Once you have had a chance to try the example, come back and we will walk through the code. ## Creating the Application All the code for the example application is within `app.py`. I'll break it down into sections and walk through what each is doing. ### Connecting to MongoDB One of the very first things we do is connect to our MongoDB database.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.07526013255119324, -0.03035750240087509, -0.004864227958023548, -0.05822206661105156, 0.03205810859799385, -0.04861610382795334, 0.004985445644706488, -0.02333456091582775, -0.004641909617930651, -0.015153534710407257, 0.008255629800260067, -0.05333547294139862, 0.049077633768320084, 0.042664047330617905, -0.04892650246620178, 0.009037360548973083, 0.004362848587334156, -0.014875303953886032, -0.035877883434295654, 0.029178665950894356, -0.007522947620600462, -0.01590767316520214, -0.024493902921676636, -0.06092322617769241, -0.017438985407352448, 0.05831819400191307, 0.0043277679942548275, -0.03193999081850052, -0.014215837232768536, -0.21986395120620728, -0.0000884366236277856, -0.08099547028541565, -0.006209770683199167, -0.07204700261354446, 0.031196121126413345, 0.01592220738530159, -0.020778408274054527, 0.042924340814352036, -0.03000093437731266, 0.0645386204123497, 0.0793566182255745, -0.002554585924372077, -0.025862473994493484, -0.04982660710811615, -0.031541477888822556, -0.05076875165104866, -0.006531967781484127, -0.011505232192575932, 0.04927758127450943, -0.050111282616853714, 0.00579014141112566, -0.02764224261045456, -0.028315547853708267, 0.00117144372779876, 0.00549346162006259, 0.020917389541864395, 0.059914883226156235, 0.07136046141386032, 0.00955781526863575, 0.015234802849590778, 0.056136395782232285, 0.04468086361885071, -0.20597012341022491, 0.09287157654762268, 0.07512650638818741, 0.03269052505493164, -0.020511841401457787, -0.005318861920386553, 0.023383015766739845, 0.0009602837963029742, -0.12061773240566254, 0.0009947695070877671, 0.006646141409873962, 0.09606801718473434, 0.024745097383856773, -0.037553735077381134, 0.0036270939745008945, -0.0652272179722786, 0.026167403906583786, 0.040600065141916275, -0.014374886639416218, -0.03767522796988487, -0.03613634034991264, 0.014628324657678604, -0.011881357990205288, -0.06178595870733261, 0.02548813819885254, 0.00047483411617577076, 0.05316391959786415, 0.014776480384171009, -0.017380667850375175, -0.03736090660095215, 0.047003019601106644, 0.010933183133602142, -0.07508280128240585, 0.03934275731444359, 0.06738010793924332, 0.017863040789961815, -0.03322149068117142, 0.2394898533821106, -0.037313155829906464, 0.04482649639248848, -0.011511970311403275, -0.008721515536308289, 0.01924148015677929, -0.03533153980970383, 0.004009163472801447, -0.016587216407060623, -0.0005487362504936755, 0.008187148720026016, 0.011114133521914482, -0.03298065438866615, 0.03654033690690994, -0.09083714336156845, 0.024201983585953712, 0.04428659752011299, -0.027801815420389175, 0.033527228981256485, -0.06576591730117798, 0.018931124359369278, 0.008159816265106201, 0.017002621665596962, 0.029253534972667694, 0.000868269766215235, 0.0353209562599659, -0.026766231283545494, 0.0670991763472557, 0.08231455832719803, -0.01836852915585041, 0.05961449071764946, 0.051532138139009476, 0.010174013674259186, -0.07241072505712509, -0.021382195875048637, 0.022590504959225655, 0.02076156809926033, 0.003717227140441537, -0.004165461286902428, 0.034518174827098846, 0.0034938910976052284, -0.00371556356549263, -0.09943218529224396, -0.04874587431550026, -0.09399361163377762, -0.005500799510627985, 0.09281618893146515, -0.02271818369626999, 0.09493612498044968, -0.08296684920787811, -0.045427851378917694, -0.0038609830662608147, -0.003626289078965783, -0.05613161250948906, -0.03730930760502815, -0.0043646167032420635, -0.006719980388879776, 0.0465686097741127, 0.0791485533118248, 0.0057097370736300945, 0.0001049703496391885, -0.052424993366003036, -0.026463672518730164, -0.037494443356990814, 0.06380240619182587, 0.007487891707569361, -0.0928196907043457, 0.010595305822789669, 0.013400662690401077, -0.007737613748759031, -0.005208445712924004, -0.015170883387327194, 0.0065500992350280285, -0.053413160145282745, -0.01642371527850628, 0.0920337587594986, -0.005542293656617403, -0.03500599041581154, -0.030584590509533882, 0.0170797947794199, 0.04043697938323021, 0.004977357108145952, -0.027171993628144264, -0.05624517798423767, 0.027128763496875763, 0.0203779935836792, -0.06385545432567596, -0.01964189112186432, -0.025924261659383774, 0.034952562302351, 0.05143420025706291, -0.021444546058773994, -0.003919892944395542, -0.023414380848407745, -0.025469696149230003, -0.01962878368794918, -0.042440015822649, -0.028536420315504074, -0.004333917982876301, 0.017030401155352592, -0.0698666051030159, 0.10617785900831223, 0.022132741287350655, -0.034531086683273315, 0.05396338924765587, -0.04473855718970299, 0.03169775754213333, -0.054789915680885315, -0.008188080042600632, 0.04081932455301285, -0.007716169580817223, -0.052309419959783554, 0.033996205776929855, 0.0460585355758667, -0.009740311652421951, -0.07133031636476517, -0.011702628806233406, -0.02611994743347168, 0.04092337191104889, 0.06237662583589554, 0.03775542229413986, 0.012084141373634338, -0.07670210301876068, -0.03938557580113411, -0.23290634155273438, 0.047385040670633316, 0.004682530183345079, -0.007805733475834131, 0.043743591755628586, -0.03364776447415352, 0.019072212278842926, -0.009474042803049088, 0.017569733783602715, 0.013393303379416466, 0.10986936092376709, -0.04055819660425186, 0.030559536069631577, 0.05328243970870972, -0.02242136187851429, 0.05855807289481163, 0.0033513526432216167, 0.007196968887001276, -0.022314399480819702, -0.014099601656198502, -0.008118563331663609, -0.028853757306933403, -0.027327261865139008, -0.0771418958902359, 0.058250512927770615, -0.0030399225652217865, 0.197959303855896, 0.04663098603487015, 0.022366022691130638, -0.07080642879009247, 0.03242875635623932, 0.02083374746143818, -0.032144058495759964, -0.17386288940906525, 0.010670304298400879, 0.04662088677287102, 0.022289210930466652, 0.06107751280069351, 0.03018464706838131, -0.01075121108442545, 0.0020979116670787334, 0.03744695335626602, 0.04793741926550865, -0.06723373383283615, -0.003151136916130781, -0.04278162121772766, -0.026727231219410896, 0.005275977775454521, -0.03573114052414894, 0.01851346343755722, -0.006621941924095154, 0.0418313592672348, 0.030104706063866615, 0.023400409147143364, -0.04043694585561752, 0.008273758925497532, -0.05175388976931572, 0.0010197135852649808, -0.0181781817227602, 0.03422845900058746, 0.006713788025081158, -0.040411997586488724, 0.018788747489452362, -0.022829795256257057, 0.023121798411011696, -0.013129379600286484, 0.010257204063236713, -0.02626723237335682, 0.0694684386253357, -0.05308183282613754, -0.016391612589359283, 0.0676937848329544, -0.024779148399829865, 0.043218113481998444, 0.04356806352734566, 0.004412796813994646, 0.004372692666947842, 0.0028052558191120625, -0.0029429567512124777, -0.015290777198970318, 0.03933081775903702, -0.043119218200445175, 0.022707022726535797, 0.011944207362830639, 0.05046273022890091, 0.003107891883701086, 0.06737244129180908, 0.01911182887852192, 0.007054187823086977, 0.019200913608074188, -0.037701040506362915, -0.020405426621437073, -0.028947830200195312, -0.023752467706799507, -0.017302092164754868, 0.016686327755451202, -0.27771565318107605, 0.02261778898537159, -0.04409847781062126, 0.03948836401104927, 0.017670758068561554, 0.06426101177930832, 0.06894151866436005, 0.03937077894806862, -0.05375855416059494, 0.017715271562337875, 0.028637172654271126, -0.0016846684738993645, 0.03176091983914375, 0.036647647619247437, 0.004169771447777748, 0.06213592737913132, 0.050934117287397385, -0.020625777542591095, 0.033217139542102814, -0.03857170790433884, 0.00505838030949235, 0.02922634780406952, 0.20000983774662018, 0.0025291170459240675, 0.05382616072893143, 0.05697634443640709, -0.022641444578766823, 0.0037476802244782448, 0.032616257667541504, 0.026632128283381462, 0.0011879410594701767, -0.0057610319927334785, 0.06255584955215454, -0.04639718309044838, 0.03260079398751259, 0.0259679164737463, -0.026331480592489243, 0.025513270869851112, 0.03714950755238533, -0.04418867453932762, -0.031917113810777664, 0.04129830747842789, -0.013040989637374878, 0.0088600292801857, 0.09249554574489594, -0.054004356265068054, -0.020290546119213104, -0.09515509754419327, 0.02147584967315197, 0.027227425947785378, -0.04627341777086258, -0.06294389069080353, -0.01383889652788639, 0.01930311508476734, 0.06927048414945602, 0.016951309517025948, -0.014736556448042393, 0.03173774108290672, -0.02901209145784378, -0.021544745191931725, 0.01341202761977911, -0.08860886096954346, 0.0343853197991848, 0.03858637064695358, 0.038721196353435516 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
### Connecting to MongoDB One of the very first things we do is connect to our MongoDB database. ``` python client = motor.motor_asyncio.AsyncIOMotorClient(os.environ"MONGODB_URL"]) db = client.get_database("college") student_collection = db.get_collection("students") ``` We're using the async [motor driver to create our MongoDB client, and then we specify our database name `college`. ### The \_id Attribute and ObjectIds ``` python # Represents an ObjectId field in the database. # It will be represented as a `str` on the model so that it can be serialized to JSON. PyObjectId = Annotatedstr, BeforeValidator(str)] ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.050679922103881836, 0.010029176250100136, 0.007451031822711229, -0.030612986534833908, -0.004811773542314768, -0.01905105821788311, 0.027533920481801033, 0.040911827236413956, 0.00687057850882411, 0.0006547385710291564, -0.03031894937157631, -0.06492987275123596, 0.04173240438103676, 0.05768918618559837, -0.047110527753829956, -0.018188225105404854, -0.00831651221960783, 0.02010830119252205, -0.024607140570878983, 0.02571292594075203, 0.014461168088018894, -0.0024935586843639612, -0.044419530779123306, -0.052039485424757004, 0.006037021521478891, 0.10737708956003189, 0.027852410450577736, -0.020606564357876778, -0.034599222242832184, -0.21614764630794525, -0.004891919903457165, -0.08399336040019989, 0.013231897726655006, -0.03628068417310715, 0.009634911082684994, 0.0012648520059883595, 0.021104959771037102, 0.06631787866353989, -0.00819050520658493, 0.05349872261285782, 0.06445502489805222, -0.03492992743849754, -0.049973264336586, -0.05868145823478699, -0.027971114963293076, -0.04469907283782959, -0.00590128917247057, -0.0017276272410526872, 0.016223564743995667, -0.05407212674617767, -0.03499500826001167, -0.020579857751727104, -0.04572996124625206, -0.009712038561701775, 0.014244120568037033, 0.056363191455602646, 0.03179185464978218, 0.04432804137468338, 0.0010855135042220354, -0.00685186916962266, 0.04563180357217789, 0.0512566976249218, -0.15806211531162262, 0.105389304459095, 0.036489278078079224, 0.057853590697050095, -0.046878110617399216, -0.02346794866025448, 0.03972778841853142, 0.005438898224383593, -0.02996412292122841, -0.024499692022800446, 0.021811222657561302, 0.04645347595214844, 0.018480170518159866, -0.054197609424591064, -0.0016314147505909204, -0.051807716488838196, 0.04267164692282677, 0.032357167452573776, -0.06432173401117325, -0.01909116841852665, -0.005240133032202721, -0.014272455126047134, -0.02634420618414879, -0.00854238960891962, 0.0453525148332119, -0.07836370915174484, 0.0206130500882864, 0.00993247702717781, -0.0354989692568779, -0.03440382331609726, 0.0041317418217659, 0.036463022232055664, -0.05735769867897034, 0.038975685834884644, 0.004898088052868843, 0.010433489456772804, -0.027074597775936127, 0.2239869087934494, -0.05373668298125267, 0.03492377698421478, 0.013237280771136284, 0.0129738450050354, 0.016509031876921654, -0.03702846169471741, -0.03848690167069435, -0.0464482344686985, -0.0016590970335528255, 0.03644317016005516, -0.016016175970435143, -0.008975744247436523, -0.019030030816793442, -0.039278171956539154, 0.0515315905213356, 0.048312943428754807, -0.022528531029820442, 0.038145292550325394, -0.04093577340245247, 0.012787636369466782, -0.01891518011689186, 0.06641538441181183, 0.03088165633380413, 0.0346757210791111, 0.026326335966587067, -0.03296365588903427, 0.03199353814125061, 0.11212604492902756, -0.013252893462777138, 0.057051826268434525, 0.01682332716882229, -0.002219533082097769, -0.09765710681676865, 0.003975592087954283, 0.03178808465600014, 0.013944718055427074, -0.015237826853990555, 0.01258076447993517, 0.03469446673989296, 0.044693708419799805, 0.00017781548376660794, -0.11728879064321518, -0.04749275743961334, -0.07342928647994995, -0.021970098838210106, 0.12277016043663025, -0.02679331973195076, 0.08683459460735321, -0.057788778096437454, -0.024445869028568268, 0.0059094796888530254, 0.03244878351688385, -0.06300173699855804, -0.024426523596048355, 0.0008494829526171088, 0.05438116192817688, 0.03651690483093262, 0.0618988461792469, -0.024609988555312157, -0.02737964503467083, -0.03717965632677078, -0.04542442783713341, -0.03836015984416008, 0.07340886443853378, 0.005447158589959145, -0.13711011409759521, -0.011244412511587143, 0.0026085490826517344, -0.019414179027080536, -0.05072608217597008, 0.0026716801803559065, 0.01716257445514202, -0.06473912298679352, 0.021313225850462914, 0.10653103142976761, 0.029196828603744507, -0.04074139893054962, -0.004729074891656637, 0.01303283590823412, -0.011004538275301456, -0.00751432403922081, -0.015439075417816639, -0.053354255855083466, -0.028682420030236244, -0.005968799348920584, -0.04202317073941231, -0.03175452724099159, -0.014452406205236912, 0.02817697636783123, 0.028076007962226868, 0.016414199024438858, -0.014628265984356403, -0.012346011586487293, -0.026602813974022865, -0.014812118373811245, -0.05270719528198242, 0.004688829183578491, -0.04393436387181282, 0.013159012421965599, -0.06468804180622101, 0.061266832053661346, 0.06664982438087463, -0.019616082310676575, 0.05647340044379234, 0.002093785209581256, -0.01993533782660961, -0.04328865185379982, -0.013772792182862759, 0.0098892105743289, 0.02124863862991333, -0.04245759919285774, -0.01577080227434635, 0.04638895392417908, 0.007508466485887766, -0.03625928983092308, 0.0031664641574025154, 0.006784916389733553, 0.025408634915947914, 0.07151100039482117, 0.031345415860414505, 0.0103021040558815, -0.06512033939361572, -0.0013811031822115183, -0.2467460185289383, 0.04302044212818146, 0.011442781426012516, 0.0008161877049133182, -0.002045142464339733, -0.04707871004939079, 0.004626129753887653, 0.005450480151921511, -0.039497777819633484, 0.021704496815800667, 0.08949616551399231, -0.0008168283384293318, 0.032928019762039185, 0.0018331549363210797, -0.06144995987415314, 0.09844315052032471, -0.020656000822782516, 0.01398664154112339, -0.039726871997117996, 0.03788762539625168, -0.02147991955280304, -0.01532342005521059, -0.021465005353093147, -0.040068916976451874, 0.022655611857771873, -0.023271221667528152, 0.248712420463562, 0.018748382106423378, 0.005372727755457163, -0.03355766087770462, 0.03759506344795227, 0.012753077782690525, -0.04735486954450607, -0.1081230416893959, 0.0437011756002903, -0.023062704131007195, 0.034189388155937195, 0.04328151419758797, -0.012121966108679771, -0.0338447242975235, -0.013075157068669796, 0.03182518109679222, 0.04006269946694374, -0.07896251976490021, -0.014835561625659466, -0.05758991837501526, -0.04923669248819351, -0.012301451526582241, -0.019297879189252853, 0.03150036558508873, 0.030450984835624695, 0.08054684102535248, 0.04626677557826042, 0.028050946071743965, -0.031764909625053406, -0.017972812056541443, -0.03518002852797508, 0.02447756752371788, -0.04021154344081879, 0.07503645122051239, 0.020242322236299515, -0.056997913867235184, 0.006510934792459011, -0.040076445788145065, 0.03843821585178375, -0.014751712791621685, -0.014435825869441032, -0.0411561094224453, 0.028858769685029984, -0.06033119559288025, -0.011152028106153011, 0.065506212413311, -0.0017559624975547194, 0.022684186697006226, 0.05783907324075699, 0.022690897807478905, 0.01721336506307125, -0.015238447114825249, -0.01767805963754654, 0.008171523921191692, 0.010149853304028511, -0.023605013266205788, 0.05281810835003853, 0.028857842087745667, 0.06770803034305573, 0.011184081435203552, 0.03916914388537407, -0.006739804986864328, 0.021236997097730637, -0.02548881806433201, -0.04621104523539543, -0.019654639065265656, -0.05374153330922127, -0.0050732591189444065, 0.030273398384451866, -0.011161994189023972, -0.28835827112197876, 0.03957349807024002, -0.01781066693365574, 0.06590169668197632, -0.0001017516478896141, 0.026681631803512573, 0.06754456460475922, -0.003148544579744339, -0.04539056494832039, -0.007253088988363743, 0.03099106065928936, 0.012664965353906155, 0.023272804915905, 0.023659629747271538, -0.0061090318486094475, 0.09075411409139633, 0.03329844027757645, -0.07673108577728271, 0.06073416396975517, -0.019812343642115593, 0.028049267828464508, 0.07132818549871445, 0.19652621448040009, -0.0015043491730466485, 0.06911122053861618, 0.056711919605731964, 0.021299133077263832, 0.05929381027817726, 0.06402923166751862, 0.030988743528723717, 0.01579783298075199, 0.006368888542056084, 0.09944789111614227, -0.006483954377472401, 0.03841501846909523, 0.0022080987691879272, -0.03208239749073982, 0.008600182831287384, 0.032264046370983124, -0.033936239778995514, -0.03873510658740997, 0.037260446697473526, -0.04296267777681351, -0.014940365217626095, 0.10583171248435974, -0.03392048552632332, -0.057302966713905334, -0.082713782787323, -0.006746702827513218, -0.024233276024460793, -0.0505850724875927, -0.04475373029708862, -0.037245675921440125, -0.007558933459222317, 0.013015142641961575, 0.029239565134048462, 0.00030715815955772996, 0.03600026294589043, -0.015254470519721508, -0.015421000309288502, 0.03770456463098526, -0.08343912661075592, 0.008530407212674618, 0.04908223822712898, -0.003367014927789569 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
MongoDB stores data as [BSON. FastAPI encodes and decodes data as JSON strings. BSON has support for additional non-JSON-native data types, including `ObjectId` which can't be directly encoded as JSON. Because of this, we convert `ObjectId`s to strings before storing them as the `id` field. ### Database Models Many people think of MongoDB as being schema-less, which is wrong. MongoDB has a flexible schema. That is to say that collections do not enforce document structure by default, so you have the flexibility to make whatever data-modelling choices best match your application and its performance requirements. So, it's not unusual to create models when working with a MongoDB database. Our application has three models, the `StudentModel`, the `UpdateStudentModel`, and the `StudentCollection`. ``` python class StudentModel(BaseModel): """ Container for a single student record. """
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.036785420030355453, -0.0014439199585467577, 0.01233137957751751, -0.033406928181648254, 0.03540828078985214, -0.039402998983860016, -0.0024045882746577263, 0.010649129748344421, -0.014845358207821846, 0.0029708321671932936, -0.01446025725454092, -0.042816996574401855, 0.04882654920220375, 0.041095633059740067, -0.043592315167188644, -0.02380426786839962, -0.0001443002256564796, -0.0232172142714262, -0.03828990086913109, 0.07200098037719727, 0.046451035887002945, -0.004998530261218548, -0.058561649173498154, -0.033124785870313644, 0.001382645103149116, 0.09142287075519562, 0.015328473411500454, -0.018749265000224113, -0.030421806499361992, -0.22727036476135254, 0.006449022796005011, -0.07451993227005005, 0.03553776815533638, -0.05516528710722923, 0.015604422427713871, 0.006827163510024548, 0.007471959572285414, 0.07340779155492783, -0.02219357341527939, 0.06036655232310295, 0.06040836498141289, 0.015330461785197258, -0.03992307931184769, -0.0462762825191021, -0.03440751135349274, -0.00031085495720617473, -0.020063577219843864, -0.01753961853682995, 0.020533477887511253, -0.0344427265226841, 0.004042661748826504, -0.016975319012999535, -0.05897565186023712, 0.011890053749084473, 0.012408070266246796, 0.043942272663116455, 0.032327406108379364, 0.0533243753015995, -0.02638544887304306, -0.0003092121332883835, 0.05126069486141205, 0.058832693845033646, -0.1271672248840332, 0.11980731785297394, 0.03874358534812927, 0.07023269683122635, -0.029714971780776978, -0.04619165509939194, 0.03959353268146515, 0.0058187986724078655, -0.04627938196063042, -0.013724812306463718, 0.02362281084060669, 0.05189340561628342, 0.025895312428474426, -0.04051949828863144, 0.013199730776250362, -0.03264997899532318, 0.02620285376906395, 0.03727240487933159, -0.052436813712120056, -0.06186971068382263, -0.02634791098535061, -0.0006582982023246586, -0.03132269158959389, -0.07774284482002258, 0.010054241865873337, -0.07567009329795837, 0.019709348678588867, 0.014700422994792461, -0.01743352599442005, -0.03236229717731476, 0.0091489776968956, 0.0571015439927578, -0.06717905402183533, 0.030206404626369476, -0.023794453591108322, 0.051167357712984085, -0.027767593041062355, 0.2328934520483017, -0.028301158919930458, 0.036541346460580826, 0.03107742965221405, -0.008376315236091614, 0.02119620516896248, -0.04256140813231468, -0.03392718732357025, -0.061727844178676605, 0.006616586819291115, -0.010447814129292965, -0.014424934051930904, -0.032908957451581955, -0.011446007527410984, -0.07353917509317398, 0.008804232813417912, -0.005602901801466942, -0.011551670730113983, 0.03481244295835495, -0.06455889344215393, 0.020645305514335632, 0.006383338011801243, 0.08926252275705338, 0.053942061960697174, 0.005403005052357912, 0.004781084600836039, -0.03068595752120018, 0.024241413921117783, 0.0661061480641365, -0.008364574052393436, 0.05435607582330704, 0.05425187572836876, -0.030361462384462357, -0.10594594478607178, -0.03210749849677086, 0.01877344399690628, -0.018712365999817848, 0.015170899219810963, 0.013189858756959438, 0.012009818106889725, 0.018288200721144676, -0.03241082280874252, -0.08206866681575775, -0.01625596545636654, -0.06676226854324341, -0.036799073219299316, 0.1316050887107849, 0.005260013043880463, 0.08587325364351273, -0.08016884326934814, -0.00930692721158266, -0.02445586957037449, 0.062178052961826324, -0.05435837805271149, -0.038482025265693665, 0.00033099361462518573, -0.0029214140959084034, 0.03342931717634201, 0.04151521250605583, -0.028142008930444717, -0.00872894749045372, -0.02624610625207424, -0.0002507810713723302, -0.041463665664196014, 0.07403021305799484, 0.0028801970183849335, -0.09578637778759003, -0.012527840211987495, -0.0025250425096601248, -0.0076950788497924805, -0.037771064788103104, 0.002952476730570197, 0.0396108515560627, -0.06271280348300934, 0.002653224626556039, 0.08540739864110947, 0.026529934257268906, -0.05134620890021324, -0.06278081983327866, 0.02244531363248825, -0.011616808362305164, -0.05283394083380699, -0.029509935528039932, -0.04452720656991005, 0.00301994476467371, 0.010814237408339977, -0.07061856240034103, -0.028544798493385315, -0.03816329687833786, 0.06084832176566124, 0.03367484733462334, 0.00729169137775898, 0.0100185452029109, -0.032504141330718994, 0.0026509149465709925, -0.02255830727517605, -0.0480414479970932, 0.0276488084346056, -0.039744000881910324, 0.022736230865120888, -0.0448736734688282, 0.02616734802722931, 0.064240463078022, -0.04481164738535881, 0.05325203761458397, -0.014026596210896969, -0.026493744924664497, -0.011546002700924873, -0.017924055457115173, 0.008461814373731613, 0.004860761109739542, -0.05607084184885025, 0.01698230765759945, 0.016479210928082466, -0.005372592248022556, -0.050642598420381546, 0.00818510539829731, 0.009449285455048084, 0.024197138845920563, 0.06320531666278839, 0.03032222017645836, -0.010809018276631832, -0.10059256106615067, -0.018083978444337845, -0.2503959536552429, 0.027054939419031143, -0.010869498364627361, -0.00497779157012701, -0.002607865957543254, -0.03903956711292267, 0.007250933442264795, -0.009737323969602585, -0.009363165125250816, 0.06844252347946167, 0.03510614112019539, -0.02936365455389023, 0.025562448427081108, 0.016295498237013817, -0.05331689864397049, 0.07826549559831619, -0.0060344357043504715, 0.012086369097232819, -0.032100703567266464, 0.001486411434598267, -0.012294677086174488, -0.005936498288065195, -0.02765512652695179, -0.08861805498600006, 0.03814620152115822, -0.02695360779762268, 0.24512551724910736, -0.004062963183969259, 0.043562885373830795, -0.02818307653069496, 0.05198089778423309, 0.005201836582273245, -0.033341724425554276, -0.10452346503734589, 0.05720331519842148, -0.005915569607168436, 0.0017284181667491794, 0.03515283390879631, -0.012562391348183155, -0.028904519975185394, -0.00521053047850728, 0.040294066071510315, 0.06979156285524368, -0.09736800193786621, -0.017142005264759064, -0.037642329931259155, -0.03534998372197151, -0.018623854964971542, -0.03707943484187126, 0.038090236485004425, 0.0064833746291697025, 0.050743427127599716, 0.0653710886836052, 0.05116916447877884, -0.04363572970032692, -0.013077743351459503, -0.07873784005641937, 0.0210532508790493, -0.010883580893278122, 0.04615787789225578, 0.0011895985808223486, -0.039126262068748474, 0.02568044885993004, -0.029960723593831062, 0.011001444421708584, -0.0028929170221090317, -0.019971517845988274, -0.021435322239995003, 0.012205825187265873, -0.07191469520330429, -0.007325718179345131, 0.09519793093204498, -0.02205083705484867, 0.008619209751486778, 0.05676550790667534, 0.02519589103758335, -0.009237946011126041, -0.01411047950387001, -0.011682773940265179, -0.0015636038733646274, 0.03571594879031181, -0.013406114652752876, 0.0842820405960083, 0.02692580409348011, 0.06798621267080307, 0.02685568667948246, 0.08774247765541077, 0.018723424524068832, 0.008792423643171787, -0.013641633093357086, -0.042575690895318985, -0.005298818461596966, -0.045624542981386185, -0.027930710464715958, 0.005187846254557371, 0.0219313595443964, -0.26294010877609253, 0.05631527304649353, -0.00740129454061389, 0.04388810321688652, 0.0011101891286671162, 0.04524372145533562, 0.02535095624625683, -0.0013152818428352475, -0.035605158656835556, 0.012533416040241718, 0.04255814105272293, 0.016029411926865578, 0.04560603201389313, 0.01344615500420332, -0.008567743003368378, 0.08488766849040985, 0.027267523109912872, -0.04676816239953041, 0.06651917099952698, -0.011868016794323921, 0.03525985777378082, 0.061230894178152084, 0.2207789421081543, 0.04418068751692772, 0.05510394275188446, 0.07083144783973694, 0.03762851655483246, 0.04054051265120506, 0.03495313599705696, 0.045637503266334534, 0.036451131105422974, 0.02037595584988594, 0.09884960204362869, -0.002431001979857683, 0.03075636550784111, 0.027926810085773468, -0.015325317159295082, 0.044857148081064224, 0.01777934469282627, -0.02490375004708767, -0.04669320210814476, 0.022354813292622566, -0.051753025501966476, -0.004734090529382229, 0.1199239194393158, -0.027472825720906258, -0.043690841645002365, -0.07701335847377777, 0.01036722119897604, -0.025902725756168365, -0.028034159913659096, -0.06949277967214584, -0.03032832220196724, -0.037132635712623596, 0.03772324323654175, 0.004756012465804815, 0.008244342170655727, 0.01862471178174019, -0.009466043673455715, -0.013574055396020412, 0.018290026113390923, -0.044418152421712875, -0.03360094502568245, 0.06231014057993889, -0.015745369717478752 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
# The primary key for the StudentModel, stored as a `str` on the instance. # This will be aliased to `_id` when sent to MongoDB, # but provided as `id` in the API requests and responses. id: OptionalPyObjectId] = Field(alias="_id", default=None) name: str = Field(...) email: EmailStr = Field(...) course: str = Field(...) gpa: float = Field(..., le=4.0) model_config = ConfigDict( populate_by_name=True, arbitrary_types_allowed=True, json_schema_extra={ "example": { "name": "Jane Doe", "email": "[email protected]", "course": "Experiments, Science, and Fashion in Nanophotonics", "gpa": 3.0, } }, ) ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.015744293108582497, 0.0016902508214116096, 0.03213263303041458, -0.03782307356595993, 0.02278633415699005, -0.01970590278506279, 0.0268529262393713, 0.040025077760219574, 0.013490216806530952, -0.015486675314605236, 0.0005250097019597888, -0.08670513331890106, 0.03140686824917793, 0.025998102501034737, -0.03144871070981026, -0.02288997918367386, -0.04577653855085373, 0.031182911247015, -0.02626965008676052, 0.040981803089380264, 0.056109488010406494, -0.010213974863290787, -0.025506967678666115, -0.022510061040520668, 0.015899701043963432, 0.08199971914291382, -0.0011719922767952085, 0.006352085620164871, -0.05418035760521889, -0.24758633971214294, 0.023590970784425735, -0.05253886058926582, 0.02650477923452854, -0.019243089482188225, 0.00099243875592947, -0.00991558376699686, 0.004001182038336992, 0.055506519973278046, -0.05682937055826187, 0.05240372568368912, 0.04547756910324097, -0.023503441363573074, -0.05528489127755165, -0.052212461829185486, -0.029734034091234207, -0.050322871655225754, -0.04982918128371239, -0.028912046924233437, 0.007740351837128401, -0.05003141984343529, -0.0150776207447052, -0.03184415027499199, -0.06069878116250038, 0.022007158026099205, 0.024758776649832726, 0.028642617166042328, 0.03411692753434181, 0.04887207970023155, 0.008711153641343117, -0.022735251113772392, 0.02508167363703251, 0.07081956416368484, -0.15559431910514832, 0.07574933767318726, 0.03285719454288483, 0.06942369788885117, -0.048840925097465515, -0.038399990648031235, 0.029288358986377716, 0.015378746204078197, -0.03991270810365677, 0.029792502522468567, 0.0033228134270757437, 0.053449537605047226, 0.03570878133177757, -0.042618099600076675, -0.008922144770622253, -0.04608955234289169, 0.0648336112499237, 0.04261374846100807, -0.06366480141878128, -0.028610071167349815, -0.013638689182698727, -0.001993625657632947, -0.008272569626569748, -0.023881837725639343, 0.058739665895700455, -0.07964904606342316, 0.03356032073497772, 0.004545075353235006, -0.03378184139728546, -0.07851363718509674, 0.009749429300427437, 0.07359542697668076, -0.057216305285692215, 0.04380343109369278, -0.012436117976903915, 0.016207117587327957, -0.05995643138885498, 0.22956988215446472, -0.035050369799137115, 0.004600116983056068, 0.016822822391986847, -0.010980713181197643, 0.03843960911035538, -0.04006027430295944, -0.029898712411522865, -0.06711405515670776, 0.014020084403455257, 0.006787744350731373, -0.025790028274059296, -0.0068357461132109165, 0.02032388187944889, -0.06813915073871613, 0.010994927957654, 0.01598266139626503, -0.005221485625952482, 0.048725426197052, -0.03249751403927803, -0.023039642721414566, -0.010011869482696056, 0.06385929882526398, 0.044575128704309464, 0.0065072206780314445, 0.0030971099622547626, -0.011276124976575375, 0.03394598513841629, 0.10160492360591888, 0.006034920457750559, 0.05477568507194519, 0.05062524229288101, -0.03802661597728729, -0.10880772769451141, -0.017545899376273155, -0.027033722028136253, -0.017932161688804626, -0.01955271139740944, 0.03591731935739517, 0.0209500752389431, 0.04389632120728493, -0.04758153855800629, -0.10199955105781555, -0.07899494469165802, -0.05253555253148079, -0.05100679397583008, 0.15966403484344482, -0.034609660506248474, 0.0654783695936203, -0.02476949244737625, 0.0070661697536706924, 0.0029217868577688932, 0.012932836078107357, -0.04371465742588043, -0.00597516680136323, 0.016371745616197586, 0.039647094905376434, 0.03300858661532402, 0.07384757697582245, -0.01709599234163761, -0.017705798149108887, -0.05355466902256012, -0.053051453083753586, -0.02689621038734913, 0.07051428407430649, 0.012727247551083565, -0.11198311299085617, -0.006587239447981119, 0.008851313032209873, -0.01016300544142723, -0.05192122980952263, 0.05510265380144119, 0.03380587324500084, -0.04754634201526642, 0.039580438286066055, 0.0733020231127739, 0.029768239706754684, -0.03007611073553562, -0.018837599083781242, 0.003766248468309641, 0.022487841546535492, -0.005935066845268011, -0.04213719069957733, -0.022460050880908966, -0.004515152890235186, 0.030716868117451668, -0.041841328144073486, -0.009595470502972603, -0.04216853156685829, 0.0007103473762981594, 0.01424767728894949, 0.010759294033050537, 0.06310427188873291, -0.033544912934303284, -0.013999183662235737, -0.028260912746191025, -0.046314433217048645, 0.006579115055501461, -0.05616340413689613, 0.012570253573358059, -0.03482295200228691, 0.054893624037504196, 0.07731426507234573, -0.012509536929428577, 0.05147001892328262, -0.004191188607364893, -0.01276429183781147, 0.00857512280344963, 0.00019442258053459227, 0.03522898629307747, 0.029725443571805954, -0.0381738543510437, -0.016612296923995018, 0.04208141937851906, -0.00891378615051508, -0.037021949887275696, -0.004339438397437334, 0.038798265159130096, 0.01132899709045887, 0.06275885552167892, 0.034062065184116364, 0.006873042322695255, -0.040564388036727905, -0.018538057804107666, -0.23811686038970947, 0.05070651322603226, -0.003324089339002967, -0.03196796029806137, -0.0024735508486628532, -0.05558883026242256, 0.002926730550825596, -0.01006898283958435, -0.024676362052559853, 0.0743829756975174, 0.05903754010796547, 0.0004530389851424843, -0.0007860212353989482, 0.04222264513373375, -0.018970541656017303, 0.05388297513127327, -0.0070130848325788975, -0.03048861399292946, -0.04088271036744118, 0.013807237148284912, 0.0027606787625700235, -0.00395209901034832, -0.03094463050365448, -0.06278318911790848, 0.01959933340549469, -0.035768989473581314, 0.22723956406116486, 0.03904235363006592, 0.013633071444928646, -0.047079794108867645, 0.0498758964240551, 0.050193313509225845, 0.0042276824824512005, -0.11414354294538498, 0.031662605702877045, -0.035473983734846115, 0.03314927965402603, 0.03872326388955116, -0.006404281128197908, -0.036045245826244354, 0.018953725695610046, 0.03306158632040024, 0.024530934169888496, -0.07472323626279831, -0.010737847536802292, -0.04426974430680275, -0.04744551330804825, -0.0012594112195074558, -0.058680519461631775, 0.057999808341264725, 0.0050048548728227615, 0.05611305683851242, 0.07916658371686935, 0.028507549315690994, -0.023374011740088463, -0.021359503269195557, -0.07638177275657654, 0.01829591952264309, -0.033248171210289, 0.06952645629644394, 0.016553321853280067, -0.018009265884757042, 0.0456300750374794, -0.07018779963254929, 0.004195742774754763, -0.038800742477178574, -0.01321381889283657, -0.03653090447187424, 0.018086180090904236, -0.0885581374168396, -0.028927169740200043, 0.07765335589647293, 0.016647065058350563, 0.05969007685780525, 0.052217818796634674, 0.044682495296001434, 0.013806353323161602, -0.015822863206267357, -0.026402972638607025, -0.012038635089993477, 0.02072533778846264, -0.048945214599370956, 0.03595907241106033, 0.03703867271542549, 0.09196571260690689, 0.015078236348927021, 0.06861553341150284, 0.028169360011816025, 0.0455545037984848, -0.04634353518486023, -0.04269593581557274, -0.011516048572957516, -0.04025321453809738, -0.019814837723970413, 0.007811421994119883, -0.01536406110972166, -0.25854671001434326, 0.04964371398091316, 0.023229971528053284, 0.08220135420560837, 0.009182289242744446, 0.06886961311101913, 0.02346913516521454, -0.01681683212518692, -0.0694800317287445, -0.006241874769330025, -0.008068316616117954, -0.002545903902500868, 0.03133570775389671, 0.007208212744444609, -0.03361649438738823, 0.07223614305257797, 0.024584967643022537, -0.05901312828063965, 0.04096861556172371, -0.011569894850254059, 0.033059898763895035, 0.0933896154165268, 0.17698726058006287, 0.01621217466890812, 0.023093700408935547, 0.049354709684848785, 0.01467182207852602, 0.05171152949333191, 0.0598924420773983, 0.02333942800760269, 0.03716650605201721, -0.017940664663910866, 0.11231087148189545, 0.01869986765086651, 0.05820267274975777, 0.013110271655023098, -0.04027843475341797, -0.012043277733027935, -0.010041909292340279, -0.01921733096241951, -0.032370805740356445, 0.01907719485461712, -0.08456127345561981, 0.0012767731677740812, 0.07412935048341751, -0.06876905262470245, -0.02801571413874626, -0.07380151748657227, -0.0008043563575483859, -0.023901550099253654, -0.0023464777041226625, -0.05645833909511566, -0.04446926340460777, 0.014745601452887058, 0.03787606209516525, 0.03714873641729355, 0.0031230628956109285, -0.007159619592130184, -0.03512744978070259, -0.012139140628278255, 0.02338235080242157, -0.04864853620529175, 0.020477011799812317, 0.016261523589491844, -0.007085123099386692 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
This is the primary model we use as the [response model for the majority of our endpoints. I want to draw attention to the `id` field on this model. MongoDB uses `_id`, but in Python, underscores at the start of attributes have special meaning. If you have an attribute on your model that starts with an underscore, pydantic—the data validation framework used by FastAPI—will assume that it is a private variable, meaning you will not be able to assign it a value! To get around this, we name the field `id` but give it an alias of `_id`. You also need to set `populate_by_name` to `True` in the model's `model_config` We set this `id` value automatically to `None`, so you do not need to supply it when creating a new student.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.04247277230024338, 0.002603664994239807, 0.01781989261507988, -0.011398901231586933, 0.02709372155368328, -0.015862761065363884, 0.06356722861528397, 0.012980454601347446, 0.012753420509397984, -0.016897467896342278, 0.02297328971326351, -0.1002793237566948, 0.034461721777915955, 0.02104627899825573, -0.04114419221878052, -0.0063802762888371944, -0.022471027448773384, 0.05602903664112091, -0.029694540426135063, 0.029110969975590706, 0.0443931445479393, 0.011228920891880989, -0.04384505748748779, -0.027190782129764557, 0.023011382669210434, 0.07592596113681793, -0.020545270293951035, -0.010764588601887226, -0.052528832107782364, -0.24152670800685883, 0.026200968772172928, -0.01889958791434765, 0.05049893260002136, -0.03290668874979019, 0.010000353679060936, -0.004416563082486391, -0.016067417338490486, 0.06119309365749359, -0.008529072627425194, 0.06494758278131485, 0.03263716772198677, -0.010320116765797138, -0.046926554292440414, -0.03670263662934303, 0.0005966173484921455, -0.05203326418995857, -0.02066684141755104, -0.01316587533801794, -0.006507901009172201, -0.027421465143561363, -0.009083906188607216, -0.01986272633075714, -0.056468866765499115, 0.015706954523921013, 0.0442444384098053, 0.060569245368242264, 0.044577278196811676, 0.010318448767066002, 0.015011259354650974, -0.014627616852521896, 0.052112020552158356, 0.08073433488607407, -0.11074961721897125, 0.06781164556741714, 0.03179299458861351, 0.08380968123674393, -0.04467687010765076, -0.0631193146109581, -0.0025258008390665054, 0.015921639278531075, -0.023828934878110886, 0.009438473731279373, 0.009709376841783524, 0.047827765345573425, 0.02598983235657215, -0.03408799320459366, 0.010756870731711388, -0.025449616834521294, 0.056887514889240265, 0.03777754679322243, -0.01843261532485485, -0.04594368487596512, -0.014764651656150818, -0.03766345605254173, -0.02526666224002838, -0.020437993109226227, 0.06241155415773392, -0.0807594582438469, 0.06619776040315628, -0.0025297494139522314, -0.016106175258755684, -0.05364800617098808, 0.009908082894980907, 0.07347938418388367, -0.05416986346244812, 0.02235283888876438, 0.0001916560431709513, 0.010624898597598076, -0.07794485986232758, 0.2316143810749054, -0.07359105348587036, 0.032751988619565964, -0.00007321598241105676, -0.011366822756826878, 0.020653322339057922, -0.017137954011559486, -0.045064955949783325, -0.04529101774096489, 0.008253823965787888, 0.000781332899350673, -0.020810406655073166, -0.014037295244634151, 0.015584591776132584, -0.07183140516281128, 0.025861727073788643, 0.03716826066374779, -0.00682521378621459, 0.04054298996925354, -0.040970079600811005, -0.05740584433078766, 0.024607807397842407, 0.03872138261795044, 0.03231355547904968, 0.005545968655496836, 0.0033055651001632214, -0.007758573163300753, 0.07334838062524796, 0.1073346883058548, -0.009108735248446465, 0.045267749577760696, 0.036207377910614014, -0.04614410921931267, -0.06741630285978317, -0.030652662739157677, 0.009857285767793655, 0.0034904670901596546, 0.021843211725354195, 0.05782080441713333, 0.0154810706153512, 0.05264556407928467, -0.04521617665886879, -0.10199607163667679, -0.056287966668605804, -0.02372928522527218, -0.020594552159309387, 0.13784924149513245, -0.03705330565571785, 0.034577321261167526, -0.029797108843922615, -0.0262004341930151, -0.02526167593896389, 0.018054969608783722, -0.07301465421915054, -0.022309429943561554, -0.010663713328540325, 0.041816893965005875, -0.01122618094086647, 0.0415848009288311, -0.011986133642494678, -0.01356656476855278, -0.016597433015704155, -0.060349781066179276, -0.02898881584405899, 0.060065899044275284, -0.02361622452735901, -0.11542152613401413, -0.03652527183294296, -0.004168449901044369, -0.01948225311934948, -0.03867620229721069, 0.009278642944991589, 0.025092126801609993, -0.07770439982414246, 0.05036943405866623, 0.09552431106567383, 0.03485412523150444, -0.059756096452474594, 0.003260962199419737, -0.0014561937423422933, 0.0047655352391302586, -0.008843658491969109, -0.033937014639377594, -0.04186643660068512, -0.021225886419415474, -0.017148731276392937, -0.06284064799547195, -0.015916533768177032, -0.028045862913131714, 0.015173781663179398, 0.028522701933979988, -0.02387583814561367, 0.0377548411488533, -0.013311248272657394, -0.003302342491224408, -0.05124608799815178, -0.039528653025627136, -0.00694489199668169, -0.0063262139447033405, 0.019422175362706184, -0.049695875495672226, -0.0038479678332805634, 0.05718864127993584, -0.028486717492341995, 0.0394437350332737, -0.03024592064321041, -0.01905449666082859, -0.020864076912403107, -0.010325674898922443, 0.01342869270592928, 0.013076422736048698, -0.04674234241247177, 0.018600447103381157, 0.04045674577355385, -0.00610360037535429, -0.040070585906505585, 0.015440081246197224, 0.008927247487008572, 0.015035105869174004, 0.03218965232372284, 0.02505117654800415, 0.009055428206920624, -0.035420436412096024, -0.003515328513458371, -0.2559431791305542, 0.052632756531238556, -0.023594677448272705, -0.0006512294057756662, 0.007163237314671278, -0.08626154065132141, 0.00136417371686548, 0.010978530161082745, -0.020425474271178246, 0.07259796559810638, 0.04323510080575943, -0.032631389796733856, -0.0021825097501277924, 0.03736390173435211, -0.05181489139795303, 0.11735736578702927, -0.019950728863477707, -0.006520349532365799, -0.0021109753288328648, 0.015580805018544197, 0.01227091159671545, -0.0017268422525376081, -0.03171561285853386, -0.06729257851839066, 0.0063675325363874435, -0.020896214991807938, 0.25816798210144043, 0.05505426228046417, -0.011412935331463814, -0.04984185844659805, 0.022489866241812706, 0.018352800980210304, -0.01748344674706459, -0.10463260859251022, 0.04696420952677727, -0.02420276589691639, 0.0026165894232690334, 0.024409525096416473, -0.006351135205477476, -0.03574115410447121, 0.01837681233882904, 0.03164832666516304, 0.0519133061170578, -0.08186770975589752, -0.015059927478432655, -0.04503513127565384, -0.052131228148937225, -0.00034902829793281853, -0.03175286576151848, 0.04258553311228752, 0.033471304923295975, 0.07856198400259018, 0.04669731855392456, 0.032566264271736145, -0.0012198688928037882, -0.033931512385606766, -0.0847770944237709, 0.014960777945816517, -0.019197028130292892, 0.03305964544415474, 0.01865210384130478, -0.03208787366747856, -0.0010700812563300133, -0.06800836324691772, -0.004557002801448107, -0.029522474855184555, -0.06135283038020134, -0.04539082199335098, 0.04571349546313286, -0.030150901526212692, -0.0255106333643198, 0.09142757952213287, 0.02099101059138775, 0.01809224858880043, 0.04383004084229469, 0.001499231206253171, 0.00683370977640152, -0.04232427477836609, -0.045077938586473465, -0.004069753922522068, 0.040539324283599854, -0.004637527745217085, 0.03500484675168991, -0.010646093636751175, 0.07864388823509216, 0.026277562603354454, 0.056701771914958954, 0.0003873017558362335, 0.07542328536510468, -0.030805131420493126, -0.04335672780871391, 0.007492851931601763, -0.030452629551291466, -0.010503225959837437, 0.016870003193616867, -0.04796408861875534, -0.26055681705474854, 0.04882409796118736, 0.0011085463920608163, 0.06480452418327332, 0.0062342421151697636, 0.055807892233133316, 0.05668894201517105, 0.014478093013167381, -0.060400545597076416, -0.032011255621910095, 0.026272859424352646, 0.020778266713023186, 0.04497123137116432, 0.03336980566382408, -0.06681770831346512, 0.06863943487405777, 0.015551513992249966, -0.08150757104158401, 0.07739760726690292, -0.021079184487462044, 0.05329831317067146, 0.07417790591716766, 0.19928297400474548, 0.014486443251371384, 0.06819897145032883, 0.03735926374793053, -0.011797339655458927, 0.04837118834257126, 0.05973361060023308, 0.06215100362896919, 0.04722796753048897, 0.013624205254018307, 0.10012729465961456, 0.01827366091310978, 0.07207512110471725, 0.017026713117957115, -0.03941499814391136, 0.0004975899937562644, 0.004529058933258057, -0.017154516652226448, -0.03437308222055435, 0.03131841495633125, -0.06439249217510223, 0.012654034420847893, 0.08292413502931595, -0.05345143750309944, -0.02655489183962345, -0.05249381437897682, -0.021537628024816513, -0.0035873979795724154, -0.023603642359375954, -0.022986851632595062, -0.05693482980132103, 0.005566293373703957, 0.05273064970970154, 0.009077627211809158, 0.009468311443924904, 0.017483092844486237, -0.021022168919444084, 0.0040651727467775345, -0.022408248856663704, -0.019559437409043312, 0.006901655346155167, 0.049641139805316925, -0.024998920038342476 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
We set this `id` value automatically to `None`, so you do not need to supply it when creating a new student. ``` python class UpdateStudentModel(BaseModel): """ A set of optional updates to be made to a document in the database. """ name: Optionalstr] = None email: Optional[EmailStr] = None course: Optional[str] = None gpa: Optional[float] = None model_config = ConfigDict( arbitrary_types_allowed=True, json_encoders={ObjectId: str}, json_schema_extra={ "example": { "name": "Jane Doe", "email": "[email protected]", "course": "Experiments, Science, and Fashion in Nanophotonics", "gpa": 3.0, } }, ) ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.03978297859430313, -0.0038998958189040422, 0.03113911673426628, -0.042411260306835175, 0.02054752968251705, 0.026125699281692505, 0.013772533275187016, 0.04906705766916275, 0.0054968069307506084, -0.005620562005788088, 0.023325113579630852, -0.06093455106019974, 0.027453947812318802, 0.035851914435625076, -0.050296470522880554, -0.02989550679922104, -0.03951498866081238, 0.023129021748900414, -0.04277469217777252, 0.017219917848706245, 0.04297914355993271, -0.018540052697062492, -0.007852788083255291, -0.018793191760778427, 0.03651382774114609, 0.09992130845785141, -0.001293189823627472, 0.0032519763335585594, -0.05330264940857887, -0.212289959192276, 0.018894385546445847, -0.05293752998113632, 0.011097717098891735, -0.015597367659211159, 0.008148714900016785, -0.0237820316106081, -0.02891358733177185, 0.054152123630046844, 0.0015812215860933065, 0.05735095217823982, 0.020831070840358734, -0.013774835504591465, -0.05165736749768257, -0.033516623079776764, -0.019776655361056328, -0.057528819888830185, -0.02119757980108261, -0.040442727506160736, 0.017869452014565468, -0.042673807591199875, -0.012844722718000412, -0.05139618366956711, -0.02773578278720379, 0.00899805873632431, -0.012134077027440071, 0.03782320022583008, 0.02617085911333561, 0.02620941586792469, 0.021218258887529373, 0.01347256451845169, 0.015702933073043823, 0.07518450915813446, -0.1564415693283081, 0.08401132375001907, 0.032018307596445084, 0.032879430800676346, -0.07125379145145416, -0.04909887537360191, 0.02858695760369301, 0.006033339072018862, -0.02768871560692787, 0.03213301673531532, 0.02773921564221382, 0.06587377935647964, 0.06674312055110931, -0.03163178637623787, 0.013189432211220264, -0.01142799574881792, 0.05081159994006157, 0.006631058175116777, -0.05343041941523552, -0.03335583209991455, 0.0003846178005915135, -0.0175222996622324, -0.0014726197114214301, -0.039274219423532486, 0.04145583510398865, -0.10104501992464066, 0.027400406077504158, 0.006429058033972979, -0.030038883909583092, -0.06785426288843155, 0.0039778901264071465, 0.06869450956583023, -0.049313876777887344, 0.014081099070608616, -0.011588088236749172, 0.014940165914595127, -0.10228104889392853, 0.2312355786561966, -0.04036639258265495, 0.02037922292947769, 0.02846394293010235, 0.0017582258442416787, 0.026509001851081848, -0.02421458438038826, -0.04330160841345787, -0.061531566083431244, -0.023837173357605934, -0.010062404908239841, -0.01734035462141037, -0.009706576354801655, 0.023614153265953064, -0.0684770941734314, -0.018926318734884262, 0.03879886120557785, 0.0245800968259573, 0.014629240147769451, -0.0232881847769022, -0.004973419476300478, -0.011247269809246063, 0.042610570788383484, 0.03620760887861252, 0.0012688364367932081, 0.0076439715921878815, -0.02118717133998871, 0.02737494744360447, 0.1260729432106018, -0.01259537786245346, 0.05514517053961754, 0.04936782643198967, -0.0337059423327446, -0.09409704804420471, -0.02290184237062931, 0.013721034862101078, -0.004259562585502863, -0.006116574630141258, 0.03718824312090874, 0.004724191967397928, -0.0006277346983551979, -0.04257067292928696, -0.09802466630935669, -0.049864429980516434, -0.049596890807151794, -0.0427224263548851, 0.14688770473003387, -0.023011643439531326, 0.08527107536792755, -0.01724907010793686, -0.01698381081223488, -0.008367059752345085, 0.021385371685028076, -0.0923081710934639, -0.02382298931479454, 0.005011411849409342, 0.052073847502470016, 0.0343332439661026, 0.04285783693194389, -0.04363301768898964, -0.020276688039302826, -0.03701802343130112, -0.03579510748386383, -0.03228192403912544, 0.08674832433462143, -0.009926737286150455, -0.12845830619335175, -0.023585041984915733, -0.011868597939610481, -0.007928375154733658, -0.017159946262836456, 0.0479721799492836, 0.06898434460163116, -0.0542706623673439, 0.033958420157432556, 0.1327613890171051, 0.014680570922791958, -0.02908133901655674, -0.010339660570025444, 0.03356223180890083, 0.0463532879948616, -0.01337056327611208, -0.027410736307501793, -0.04527083784341812, -0.011102503165602684, 0.002631356008350849, -0.025800494477152824, -0.007737534120678902, -0.0598929263651371, 0.034422263503074646, 0.023744050413370132, -0.013142311945557594, 0.04748308286070824, -0.021710723638534546, -0.054999321699142456, -0.05144936591386795, -0.03592263534665108, 0.013195255771279335, -0.0419723242521286, 0.023475125432014465, -0.03527618572115898, 0.0184254702180624, 0.06402784585952759, 0.000815782870631665, 0.04193395376205444, 0.0012447627959772944, -0.0019995931070297956, 0.006622154265642166, 0.0008285962394438684, 0.06558524072170258, 0.018598992377519608, -0.052880529314279556, -0.01870795525610447, 0.026809286326169968, -0.024164672940969467, -0.060815196484327316, 0.013558998703956604, 0.010466395877301693, 0.02292107231914997, 0.07691643387079239, 0.02997264824807644, 0.017450792714953423, -0.03503507748246193, -0.015590735711157322, -0.25545379519462585, 0.04412556067109108, 0.014230764470994473, -0.028851721435785294, -0.0037382591981440783, -0.03608874976634979, 0.04267697036266327, -0.0010625425493344665, -0.009517701342701912, 0.08149539679288864, 0.06764809787273407, 0.0031338632106781006, 0.0009839958511292934, 0.018487680703401566, -0.01796603761613369, 0.05490717664361, 0.003758592763915658, -0.013065433129668236, -0.018874747678637505, -0.0009596328600309789, 0.011297735385596752, 0.0016982359811663628, -0.02107108198106289, -0.07929372042417526, 0.0159138273447752, -0.034456659108400345, 0.22332410514354706, 0.020318875089287758, 0.054569244384765625, -0.008505952544510365, 0.05452895164489746, 0.06561659276485443, -0.03423204645514488, -0.11673101037740707, 0.03859575092792511, -0.013890211470425129, -0.013757210224866867, 0.026882417500019073, -0.011903312057256699, -0.0522727370262146, 0.03553810715675354, 0.017999596893787384, 0.020593984052538872, -0.10745685547590256, -0.023168617859482765, -0.040426865220069885, -0.02706676721572876, 0.00453140726312995, -0.04245658218860626, 0.04335438460111618, 0.04115583002567291, 0.0337483175098896, 0.0578748993575573, 0.014749839901924133, -0.02270258031785488, -0.03499343991279602, -0.061863794922828674, 0.03057274967432022, -0.008896498009562492, 0.050926849246025085, -0.0020564293954521418, -0.03283781558275223, 0.03171868622303009, -0.06816762685775757, 0.020094851031899452, -0.04118204116821289, 0.009054906666278839, -0.07005348801612854, 0.05709952116012573, -0.08025501668453217, -0.012407617643475533, 0.0990743413567543, 0.045758359134197235, 0.04860201105475426, 0.0026710948441177607, 0.003018781077116728, 0.018530376255512238, -0.006449677981436253, -0.02115069516003132, -0.012029777280986309, 0.0021551931276917458, -0.018500754609704018, 0.043038200587034225, 0.020745057612657547, 0.05677707493305206, 0.032243963330984116, 0.04848678782582283, 0.04493160918354988, 0.04284324496984482, -0.02670016698539257, -0.05049245432019234, 0.004551575053483248, -0.033595796674489975, 0.04677177593111992, 0.040149375796318054, -0.023081036284565926, -0.26193317770957947, 0.028837352991104126, 0.003867826657369733, 0.0521274134516716, 0.01615498960018158, 0.04039055481553078, 0.013664436526596546, -0.0015936424024403095, -0.08156352490186691, -0.017546113580465317, 0.012675520032644272, -0.02277204766869545, 0.011450545862317085, 0.001413937658071518, -0.006962701212614775, 0.06371857970952988, 0.057209134101867676, -0.05262121558189392, 0.03333760425448418, -0.041929490864276886, 0.02831231988966465, 0.07775574922561646, 0.19063818454742432, -0.005978249479085207, 0.08621643483638763, 0.01708408072590828, 0.010712816379964352, 0.06411319971084595, 0.06684749573469162, 0.03319963440299034, 0.0010768609354272485, -0.008057543076574802, 0.10781598091125488, -0.0235859714448452, 0.05182456225156784, 0.028288453817367554, -0.04076479375362396, -0.00943288579583168, -0.010793887078762054, -0.014928467571735382, -0.03929271548986435, -0.011560716666281223, -0.07497468590736389, 0.005954182241111994, 0.11070877313613892, -0.05790356174111366, -0.021575460210442543, -0.06913471966981888, -0.022983217611908913, -0.0161701962351799, -0.004278788808733225, -0.02166871167719364, -0.04732084274291992, 0.020366977900266647, 0.02713126689195633, 0.04654247686266899, 0.0018151600379496813, 0.005014554597437382, -0.03866497054696083, -0.04827790707349777, 0.006864219903945923, -0.026257965713739395, 0.008902985602617264, 0.05183685943484306, -0.03253449127078056 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
The `UpdateStudentModel` has two key differences from the `StudentModel`: - It does not have an `id` attribute as this cannot be modified. - All fields are optional, so you only need to supply the fields you wish to update. Finally, `StudentCollection` is defined to encapsulate a list of `StudentModel` instances. In theory, the endpoint could return a top-level list of StudentModels, but there are some vulnerabilities associated with returning JSON responses with top-level lists. ```python class StudentCollection(BaseModel): """ A container holding a list of `StudentModel` instances. This exists because providing a top-level array in a JSON response can be a [vulnerability """ students: ListStudentModel] ``` ### Application Routes Our application has five routes:
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.06129203364253044, -0.031690631061792374, 0.07336078584194183, -0.02322508953511715, 0.01382946502417326, -0.01076928898692131, -0.014039653353393078, 0.0550353042781353, -0.00840585958212614, 0.003970395773649216, 0.024494195356965065, -0.06527848541736603, 0.018851755186915398, 0.022401290014386177, -0.029736440628767014, -0.0263823252171278, -0.024635804817080498, 0.010409061796963215, -0.01586960069835186, 0.03350195288658142, 0.03945864737033844, 0.015838727355003357, -0.018907487392425537, -0.01891881600022316, 0.03488025814294815, 0.09135758131742477, -0.02071451209485531, 0.015276705846190453, -0.037188977003097534, -0.23281802237033844, 0.005372817162424326, -0.05766750127077103, 0.009194568730890751, 0.006896954961121082, -0.016556646674871445, -0.013790404424071312, 0.007168910000473261, 0.050772570073604584, 0.008970295079052448, 0.062344543635845184, 0.0413983017206192, 0.005272289272397757, -0.061785656958818436, -0.05941513553261757, -0.03511635959148407, -0.03735967352986336, -0.02379327453672886, -0.018940558657050133, 0.009441944770514965, -0.06599006801843643, 0.0116437878459692, -0.07308885455131531, -0.015448402613401413, 0.0368228405714035, 0.01146391686052084, 0.0199322160333395, 0.04799463972449303, 0.056497130542993546, 0.016401445493102074, 0.019976738840341568, 0.034687645733356476, 0.052039533853530884, -0.1779283881187439, 0.08872757852077484, 0.017837537452578545, 0.030561530962586403, -0.039616961032152176, -0.08596597611904144, 0.07118809223175049, 0.005391464103013277, -0.036790817975997925, 0.02837897650897503, 0.010884074494242668, 0.0332203209400177, 0.03218992054462433, -0.06568318605422974, 0.018825644627213478, 0.020015213638544083, 0.040125299245119095, 0.026322806254029274, -0.0337393544614315, -0.04061762988567352, 0.007312173023819923, 0.000142673947266303, 0.023600665852427483, -0.04278336465358734, 0.028608310967683792, -0.10582135617733002, 0.03395402804017067, -0.009316778741776943, -0.027170449495315552, -0.022367073222994804, -0.008756228722631931, 0.0546790286898613, -0.05982913076877594, -0.014538757503032684, 0.003278198419138789, 0.0006541698821820319, -0.07083708047866821, 0.21378636360168457, -0.04876435548067093, 0.030212365090847015, 0.06295682489871979, 0.03391066938638687, 0.023735590279102325, -0.04055536538362503, -0.006068899761885405, -0.06833714246749878, -0.02654138393700123, 0.0123094217851758, 0.005452899727970362, -0.0033543866593390703, 0.01817387528717518, -0.03915413096547127, -0.020450040698051453, 0.008746474049985409, 0.04091610386967659, 0.04041625186800957, -0.0401090644299984, -0.00008967002941062674, -0.0039403741247951984, 0.05777348577976227, 0.0628877654671669, -0.04271711781620979, -0.01882339082658291, -0.0010735112009570003, 0.04285929352045059, 0.10257913172245026, 0.0027173215057700872, 0.08334869146347046, 0.03675545006990433, 0.001897357520647347, -0.07999604940414429, -0.043722767382860184, 0.010110837407410145, -0.005283985286951065, 0.018483774736523628, 0.010327962227165699, 0.03104020655155182, 0.02375524491071701, -0.05229644104838371, -0.0753459483385086, 0.007863656617701054, -0.08111470192670822, -0.06319407373666763, 0.15533994138240814, -0.02514740079641342, 0.07738770544528961, -0.028088999912142754, -0.012500965036451817, -0.01994449272751808, 0.059179775416851044, -0.04659507796168327, -0.032645054161548615, 0.0043242196552455425, 0.03101363219320774, 0.020718563348054886, 0.06493745744228363, 0.003655343782156706, 0.013109789229929447, -0.0138560114428401, -0.05674413964152336, -0.0331168994307518, 0.08871272206306458, -0.004682322032749653, -0.11140182614326477, -0.02442813292145729, 0.011528201401233673, -0.03946521505713463, -0.035160601139068604, 0.05031009390950203, 0.046099238097667694, -0.033724378794431686, 0.029284261167049408, 0.06107709929347038, 0.013976605609059334, -0.03497934341430664, -0.013353301212191582, 0.03819260373711586, 0.006459537427872419, -0.01891282945871353, -0.02017322927713394, -0.07412561029195786, 0.013323518447577953, 0.011486023664474487, -0.053627192974090576, -0.03115130215883255, -0.04567684978246689, 0.05537942424416542, 0.031115781515836716, -0.03267204016447067, 0.013553100638091564, -0.0067275031469762325, -0.0232321098446846, -0.05373239517211914, -0.009685962460935116, -0.0064245350658893585, -0.03537031263113022, 0.04680800437927246, -0.025056565180420876, 0.03505630046129227, 0.0675622969865799, -0.05455796420574188, 0.016577251255512238, -0.03168001025915146, -0.012400597333908081, -0.02078947052359581, -0.022114545106887817, 0.025545498356223106, 0.007106578443199396, -0.07073916494846344, -0.008616062812507153, 0.03356509283185005, -0.004851536825299263, -0.05333391949534416, -0.012474225834012032, 0.03246428817510605, 0.0035196065437048674, 0.059097837656736374, 0.029908562079072, 0.004981436766684055, -0.015332084149122238, 0.006667548790574074, -0.2659359276294708, 0.04497291147708893, -0.022785291075706482, -0.0023765123914927244, -0.009531727991998196, -0.045794498175382614, 0.026740480214357376, -0.020485026761889458, -0.025077246129512787, 0.06948273628950119, 0.09616820514202118, -0.0010458192555233836, 0.025404227897524834, 0.04113026335835457, -0.0011540645500645041, 0.040361713618040085, 0.005628181621432304, 0.0028356132097542286, -0.06567943841218948, -0.012520222924649715, 0.0027114138938486576, 0.0003325882425997406, 0.008312886580824852, -0.07197757810354233, -0.012351960875093937, -0.023469600826501846, 0.24109628796577454, 0.03231799229979515, 0.006669876631349325, 0.023630164563655853, 0.03806147351861, 0.052894316613674164, -0.005856913514435291, -0.09365873038768768, 0.014003710821270943, -0.008103854954242706, 0.005359586328268051, -0.019280213862657547, -0.002865751273930073, -0.028981134295463562, 0.019438764080405235, 0.0377185121178627, 0.021720580756664276, -0.09990134090185165, -0.04910705238580704, 0.0060308221727609634, -0.029544051736593246, -0.005168889183551073, -0.03548796474933624, 0.029378917068243027, 0.02358037792146206, 0.03406217694282532, 0.058399833738803864, 0.013428306207060814, -0.019060729071497917, -0.029708148911595345, -0.047380588948726654, 0.022000689059495926, -0.018272919580340385, 0.07784127444028854, -0.026767559349536896, -0.019285814836621284, 0.020808158442378044, -0.0495128259062767, 0.04109007120132446, -0.0406828448176384, -0.003297600196674466, -0.0854167491197586, 0.019402028992772102, -0.08438412845134735, -0.042633991688489914, 0.052988070994615555, 0.011047596111893654, 0.03369290009140968, 0.024747492745518684, 0.01780955120921135, -0.002946237102150917, -0.010766318999230862, -0.035982679575681686, -0.019608251750469208, 0.005338023416697979, -0.009088785387575626, 0.03043678030371666, 0.024711666628718376, 0.031332194805145264, 0.003545057028532028, 0.033383097499608994, 0.035361241549253464, 0.01474890485405922, -0.034181468188762665, -0.0279084499925375, 0.01017794944345951, -0.03237800672650337, 0.038975343108177185, 0.031073885038495064, 0.020065808668732643, -0.28755488991737366, 0.010544243268668652, 0.009886514395475388, 0.02600126899778843, -0.02876538410782814, 0.02941802702844143, 0.019430510699748993, 0.010694202966988087, -0.03427746891975403, -0.008587339892983437, 0.04558117687702179, 0.0124986432492733, 0.031050020828843117, -0.0015053492970764637, -0.00453481450676918, 0.06560575217008591, 0.07380075752735138, -0.06738120317459106, 0.042346782982349396, -0.04063016176223755, 0.0410718098282814, 0.06332499533891678, 0.2000526636838913, 0.007967038080096245, 0.07125348597764969, 0.016602426767349243, 0.005514714866876602, 0.04556560888886452, 0.06770144402980804, 0.0013824482448399067, 0.023985253646969795, -0.029952555894851685, 0.12903788685798645, -0.017784271389245987, 0.06211195886135101, 0.018340496346354485, -0.02482881210744381, 0.016880959272384644, -0.0026253254618495703, -0.014689989387989044, -0.07155104726552963, 0.012449882924556732, -0.08782564848661423, -0.008817050606012344, 0.11138298362493515, -0.040539104491472244, -0.03723834827542305, -0.04740964621305466, 0.0038787226658314466, 0.0010328057687729597, -0.02698514424264431, -0.06775279343128204, -0.050439395010471344, -0.006700241006910801, 0.0557074174284935, 0.04739706963300705, -0.03611087054014206, -0.02435307204723358, -0.05105428397655487, -0.001582522876560688, 0.04434347525238991, 0.007710004225373268, 0.017011582851409912, 0.02897261269390583, -0.014897767454385757 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
students: ListStudentModel] ``` ### Application Routes Our application has five routes: - POST /students/ - creates a new student. - GET /students/ - view a list of all students. - GET /students/{id} - view a single student. - PUT /students/{id} - update a student. - DELETE /students/{id} - delete a student. #### Create Student Route ``` python @app.post( "/students/", response_description="Add new student", response_model=StudentModel, status_code=status.HTTP_201_CREATED, response_model_by_alias=False, ) async def create_student(student: StudentModel = Body(...)): """ Insert a new student record.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.05035531148314476, -0.023272689431905746, 0.05021994933485985, -0.03733350709080696, -0.012861769646406174, -0.002017427235841751, 0.0109634380787611, 0.030082829296588898, 0.028843844309449196, 0.02689547836780548, 0.021831469610333443, -0.06060954928398132, 0.02382783591747284, 0.04222917929291725, 0.00036502646980807185, -0.03901904821395874, -0.04942666366696358, 0.0021190904080867767, -0.016708802431821823, 0.012853387743234634, 0.03971957787871361, -0.004568071570247412, -0.01202387921512127, -0.024074837565422058, 0.031500764191150665, 0.05857529118657112, -0.005139823071658611, -0.011693150736391544, -0.05130728334188461, -0.19244170188903809, -0.004108266439288855, -0.06963897496461868, 0.0244485754519701, -0.01845868118107319, -0.016253577545285225, -0.007981129921972752, -0.002706334460526705, 0.040448665618896484, -0.041693996638059616, 0.05847272276878357, 0.055123478174209595, 0.019137537106871605, -0.046394843608140945, -0.02928188629448414, -0.009397224523127079, -0.02610604278743267, -0.04273281991481781, -0.028801284730434418, 0.047701653093099594, -0.05882267653942108, -0.002764602191746235, -0.07895510643720627, -0.03194837272167206, 0.014675946906208992, 0.02971954084932804, 0.016729101538658142, 0.07366390526294708, 0.0632425844669342, 0.01720374822616577, 0.039582278579473495, 0.03124300017952919, 0.047545742243528366, -0.18227598071098328, 0.104429692029953, 0.0205702967941761, 0.04749647155404091, -0.021820345893502235, -0.06370845437049866, 0.03060624562203884, 0.03783711418509483, -0.051707930862903595, 0.026773490011692047, 0.017694596201181412, 0.09714006632566452, 0.018964486196637154, -0.05401882529258728, 0.015941547229886055, 0.020237645134329796, 0.005222730338573456, 0.013219261541962624, -0.05443093180656433, -0.04861847311258316, 0.004998940974473953, 0.0035478908102959394, 0.02273358404636383, -0.030543038621544838, 0.017317652702331543, -0.08852051198482513, 0.027964280918240547, -0.009409758262336254, -0.028919514268636703, -0.020594771951436996, -0.018148470669984818, 0.05208195373415947, -0.07284849882125854, -0.019589751958847046, 0.03697040304541588, 0.010783723555505276, -0.06126601621508598, 0.19320262968540192, -0.07266406714916229, 0.05059177428483963, 0.05193852633237839, 0.013821120373904705, 0.02429952099919319, -0.024544652551412582, 0.00031438758014701307, -0.04617566615343094, -0.02456130087375641, 0.00009113773558055982, 0.013738843612372875, -0.020671961829066277, 0.0204006414860487, -0.048442184925079346, 0.011357815004885197, 0.028860939666628838, 0.0338127426803112, 0.045810990035533905, -0.07139270007610321, -0.015032293274998665, -0.01003899984061718, 0.014387917704880238, 0.05699006840586662, -0.025465471670031548, 0.005528225563466549, -0.005428209900856018, 0.051470186561346054, 0.10876674205064774, 0.012696514837443829, 0.0792258083820343, 0.04975038021802902, 0.01103708054870367, -0.07427099347114563, -0.02772485837340355, -0.02247585542500019, -0.03747835382819176, 0.028170611709356308, -0.0063681285828351974, 0.02878817729651928, -0.018658723682165146, -0.03813428431749344, -0.10402661561965942, -0.025653673335909843, -0.122298464179039, -0.02702995017170906, 0.15753796696662903, -0.016577281057834625, 0.06288855522871017, -0.04681727662682533, 0.010662196204066277, -0.056260786950588226, 0.03484116494655609, -0.0553937628865242, -0.02922724187374115, -0.0037400429137051105, 0.05847175046801567, 0.03822019696235657, 0.061889588832855225, 0.008903870359063148, 0.014635353349149227, -0.06307671964168549, -0.044475018978118896, -0.03787915036082268, 0.10096760839223862, 0.003980605397373438, -0.09609438478946686, 0.003209502436220646, 0.02822498045861721, -0.03356550633907318, -0.03830528259277344, 0.03410600125789642, 0.016830287873744965, -0.03630043566226959, 0.017269255593419075, 0.06929658353328705, 0.020817145705223083, -0.025406483560800552, -0.009317738935351372, -0.0032950271852314472, 0.00004536231062957086, -0.003688330063596368, -0.02469654008746147, -0.045069169253110886, 0.0213079284876585, 0.025504237040877342, -0.019241714850068092, -0.03964361175894737, -0.05727364495396614, 0.03819836303591728, 0.0033576912246644497, -0.049946945160627365, 0.002607844304293394, -0.009026173502206802, -0.06278324127197266, -0.07551213353872299, -0.007879501208662987, -0.003236552234739065, -0.0441187247633934, 0.032793715596199036, -0.03175389766693115, 0.05549038201570511, 0.02352123148739338, -0.06616994738578796, 0.03859589993953705, -0.031402695924043655, 0.014894758351147175, -0.011304296553134918, -0.018601305782794952, 0.04891044273972511, 0.0032986036967486143, -0.07835054397583008, 0.004515927284955978, 0.06655900180339813, -0.0017701921751722693, -0.03593025729060173, -0.034471914172172546, 0.010418778285384178, 0.044512417167425156, 0.06154841557145119, 0.04181739315390587, 0.0069620744325220585, -0.04994756728410721, 0.011280152015388012, -0.22658246755599976, 0.026136241853237152, 0.018500782549381256, -0.002180558629333973, 0.0016424314817413688, -0.05565054342150688, 0.007331246510148048, -0.000898531056009233, -0.02529098652303219, 0.08387146890163422, 0.11797889322042465, 0.0032581458799540997, 0.006210268475115299, 0.02551942877471447, 0.0019864714704453945, 0.036732081323862076, -0.012781702913343906, 0.005508395843207836, -0.049070704728364944, 0.0022737751714885235, -0.012908761389553547, -0.00782517995685339, 0.014016370289027691, -0.0808226689696312, 0.021548060700297356, -0.02044869214296341, 0.2595739960670471, 0.062194716185331345, 0.011521661654114723, -0.012647443450987339, 0.059014249593019485, 0.045545101165771484, -0.00860658474266529, -0.11346185207366943, 0.024122927337884903, 0.010291664861142635, 0.03050687164068222, -0.009275644086301327, 0.032461754977703094, -0.04528118297457695, 0.029107704758644104, 0.04294420778751373, 0.004052190575748682, -0.08258675783872604, -0.02181066945195198, 0.00598975969478488, -0.034210529178380966, -0.018035829067230225, -0.01478553656488657, 0.05426141992211342, 0.031204156577587128, 0.028698185458779335, 0.06322594732046127, 0.01747961714863777, -0.03505475074052811, -0.03842034935951233, -0.056312527507543564, 0.004356315825134516, -0.03725660219788551, 0.09937949478626251, -0.0280738677829504, -0.026749949902296066, 0.015852821990847588, -0.0450923815369606, 0.07192452251911163, -0.018399428576231003, -0.027372796088457108, -0.055030785501003265, 0.011256066150963306, -0.07585860788822174, -0.03373255580663681, 0.08034262806177139, 0.00843539834022522, 0.025487951934337616, 0.036895085126161575, 0.013863299041986465, -0.011159325018525124, -0.026341093704104424, -0.00679683918133378, -0.008683071471750736, 0.02349540777504444, -0.0693698450922966, 0.002731327898800373, 0.047679465264081955, 0.03111463226377964, 0.020941896364092827, 0.037405624985694885, 0.004663337487727404, 0.02871246263384819, -0.013753151521086693, -0.00662093935534358, -0.01891913264989853, -0.002976422430947423, 0.033390771597623825, 0.002857865998521447, -0.006490583065897226, -0.27318036556243896, -0.006566575262695551, 0.005354337394237518, 0.04394593462347984, -0.00024077726993709803, 0.04084447771310806, 0.05356459319591522, 0.02936735190451145, -0.03281822428107262, 0.0027856994420289993, 0.025706080719828606, 0.01727333851158619, 0.04407747462391853, -0.005573074799031019, 0.0009109432576224208, 0.06658266484737396, 0.042089685797691345, -0.05920691788196564, 0.008398618549108505, -0.019965650513768196, 0.024614881724119186, 0.0191840510815382, 0.18598271906375885, -0.012386216782033443, 0.07716663926839828, 0.050182413309812546, -0.039006300270557404, 0.06772802770137787, 0.04043174162507057, -0.0003672743623610586, 0.028465820476412773, -0.05824196711182594, 0.11372646689414978, -0.02501991018652916, 0.05928108096122742, 0.009761999361217022, -0.04921042546629906, 0.022477345541119576, 0.02762359008193016, -0.01065800804644823, -0.07945221662521362, -0.008067982271313667, -0.054356079548597336, -0.02194484882056713, 0.12111040204763412, -0.032800059765577316, -0.05728427693247795, -0.04885372892022133, 0.0006456156261265278, 0.022691303864121437, -0.025464706122875214, -0.0682675912976265, -0.04306071624159813, 0.013474435545504093, 0.056957442313432693, 0.054998237639665604, -0.03437675163149834, -0.01721285656094551, -0.08057684451341629, -0.005644471850246191, -0.00047526846174150705, -0.03139961138367653, 0.0428084172308445, 0.03301122784614563, -0.0020833583548665047 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
A unique `id` will be created and provided in the response. """ new_student = await student_collection.insert_one( student.model_dump(by_alias=True, exclude=["id"]) ) created_student = await student_collection.find_one( {"_id": new_student.inserted_id} ) return created_student ``` The `create_student` route receives the new student data as a JSON string in a `POST` request. We have to decode this JSON request body into a Python dictionary before passing it to our MongoDB client. The `insert_one` method response includes the `_id` of the newly created student (provided as `id` because this endpoint specifies `response_model_by_alias=False` in the `post` decorator call. After we insert the student into our collection, we use the `inserted_id` to find the correct document and return this in our `JSONResponse`.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.04479850083589554, 0.010139931924641132, 0.03931158781051636, -0.008711033500730991, -0.02367403544485569, -0.008504027500748634, 0.04167981445789337, 0.038248512893915176, 0.007574561517685652, 0.017758511006832123, 0.025114968419075012, -0.055452559143304825, 0.004346201196312904, 0.013213389553129673, -0.024546731263399124, -0.02843734435737133, -0.03024139069020748, -0.003227192908525467, -0.056498460471630096, 0.03529490903019905, 0.03641814738512039, -0.006497804541140795, -0.039294078946113586, -0.03946014866232872, 0.022190753370523453, 0.04901155084371567, 0.00622218195348978, -0.011539897881448269, -0.011690708808600903, -0.19898177683353424, 0.04361613467335701, -0.06296155601739883, 0.009790313430130482, -0.04749070852994919, -0.0066720726899802685, 0.010803149081766605, 0.015373650938272476, 0.07237549126148224, 0.0005352190928533673, 0.08362293243408203, 0.048380136489868164, -0.010906227864325047, -0.04789178445935249, -0.035908911377191544, 0.015482869930565357, -0.0267897080630064, -0.04358462989330292, -0.024596597999334335, 0.037330735474824905, -0.03797720745205879, -0.01418277993798256, -0.038604676723480225, -0.019571460783481598, -0.012272723019123077, 0.01737758331000805, 0.03721652179956436, 0.046667881309986115, 0.044157251715660095, -0.00587983475998044, 0.0034445731434971094, 0.0416187159717083, 0.05367496609687805, -0.13761810958385468, 0.06928051263093948, 0.03325991332530975, 0.0932084321975708, -0.044284284114837646, -0.05774320662021637, 0.06420472264289856, 0.02128441445529461, -0.020783094689249992, -0.02905396930873394, 0.017597733065485954, 0.05968392267823219, 0.04417339712381363, -0.015122096985578537, 0.026416990906000137, -0.004209176637232304, 0.03684897720813751, 0.04992818832397461, -0.07467883825302124, -0.0386493057012558, -0.00829337164759636, -0.021602580323815346, -0.029173104092478752, -0.05793740972876549, 0.05219080671668053, -0.061650022864341736, 0.04070209339261055, 0.006400225684046745, -0.014246282167732716, -0.022560203447937965, -0.0019803205505013466, 0.06454366445541382, -0.0773974061012268, -0.006440750323235989, 0.0275332722812891, 0.03209710866212845, -0.028587952256202698, 0.22730685770511627, -0.061612486839294434, 0.007327343337237835, 0.037364937365055084, 0.0021586057264357805, 0.007150417193770409, -0.05123702809214592, -0.027772650122642517, -0.05163504183292389, 0.006682555191218853, -0.013367378152906895, 0.005444363225251436, -0.0500950887799263, 0.01839197799563408, -0.04882768914103508, 0.01464075781404972, 0.03061750717461109, 0.014698552899062634, 0.06349890679121017, -0.055650513619184494, -0.007014419883489609, 0.018226798623800278, 0.03797309100627899, 0.034479036927223206, -0.04292236268520355, -0.008607765659689903, -0.03876343369483948, 0.06578896939754486, 0.07272355258464813, 0.016343647614121437, 0.051420196890830994, 0.05477159097790718, -0.03032715804874897, -0.09363008290529251, -0.01864420250058174, 0.0039880406111478806, 0.0050444891676306725, -0.021510334685444832, 0.029906831681728363, 0.03195739910006523, 0.0036773120518773794, -0.024922052398324013, -0.07597102224826813, -0.0642198771238327, -0.08237583935260773, -0.030912034213542938, 0.13215112686157227, -0.0034418876748532057, 0.07240515947341919, -0.05794243514537811, -0.018741557374596596, -0.04738960787653923, 0.022222472354769707, -0.09446249157190323, -0.05410915985703468, -0.00358055392280221, 0.05227222293615341, 0.03757994621992111, 0.0542314313352108, 0.002992497058585286, 0.009072943590581417, -0.03373156115412712, -0.05406799912452698, -0.026097921654582024, 0.10263355076313019, 0.02556351199746132, -0.1253044456243515, 0.006601019762456417, -0.007502918131649494, 0.007876350544393063, -0.041365399956703186, 0.02763926424086094, 0.04271688684821129, -0.05485248565673828, 0.02374402806162834, 0.10667233914136887, 0.04803597927093506, -0.059073686599731445, 0.00488564046099782, 0.002808489603921771, -0.0016514803282916546, -0.017183883115649223, -0.04426209256052971, -0.02183535322546959, -0.004229619167745113, 0.023590892553329468, -0.057206496596336365, -0.027341099455952644, -0.05074242129921913, 0.02351868711411953, 0.014027104713022709, -0.01712622679769993, 0.04734935984015465, -0.017391974106431007, -0.01048057246953249, -0.03923022747039795, -0.023251237347722054, -0.007894173264503479, -0.05547795444726944, 0.025007188320159912, -0.04565705358982086, 0.026810213923454285, 0.02875511534512043, -0.02140212245285511, 0.062494128942489624, -0.016056913882493973, -0.004837145563215017, 0.033306755125522614, -0.023988204076886177, 0.027950339019298553, -0.0175287127494812, -0.06995032727718353, 0.009445971809327602, 0.026457805186510086, -0.007124206051230431, -0.009838544763624668, -0.011129085905849934, 0.022012460976839066, 0.037851497530937195, 0.09572741389274597, 0.0004046029062010348, -0.03924045339226723, -0.09145252406597137, 0.04911336675286293, -0.2532668113708496, 0.03032117336988449, -0.007323273457586765, -0.009589371271431446, 0.0027940445579588413, -0.03604278340935707, 0.033203911036252975, -0.005570471752434969, -0.006310901138931513, 0.054878510534763336, 0.07277531921863556, 0.006038988009095192, 0.006057793274521828, 0.0392482616007328, -0.0034919315949082375, 0.08667221665382385, -0.010490107350051403, -0.010692426934838295, -0.007336313370615244, -0.004588864278048277, -0.02441105991601944, 0.009563700295984745, -0.007368696387857199, -0.06090947240591049, 0.023172879591584206, -0.04104479029774666, 0.24584215879440308, 0.08051028847694397, 0.003519625635817647, -0.02534363977611065, 0.05362359806895256, 0.0428038015961647, 0.00008384037209907547, -0.10636483132839203, 0.02269083447754383, -0.012888859026134014, 0.0554453507065773, 0.023021791130304337, -0.012469524517655373, -0.06496211886405945, 0.03729663044214249, 0.040387287735939026, 0.007815752178430557, -0.09453258663415909, -0.0006672277231700718, -0.026197079569101334, -0.06927786022424698, -0.032910242676734924, -0.04357672110199928, 0.0664861649274826, 0.008233309723436832, 0.01585642620921135, 0.07143021374940872, 0.018672829493880272, -0.028297031298279762, -0.04556242376565933, -0.07451418042182922, -0.0022780646104365587, -0.03907666355371475, 0.07601649314165115, -0.01318563986569643, -0.025266127660870552, 0.03977883607149124, -0.05117521062493324, 0.04075406864285469, 0.00417350884526968, -0.014357661828398705, -0.014037460088729858, 0.018483227118849754, -0.10077711939811707, -0.006090232636779547, 0.0852290466427803, 0.011350118555128574, 0.034592404961586, 0.04040474817156792, 0.04871067777276039, 0.021539561450481415, -0.041535865515470505, -0.0370972566306591, 0.013720638118684292, 0.004510148428380489, -0.03828178718686104, 0.04529890790581703, 0.034983713179826736, 0.04847477748990059, 0.031612228602170944, 0.030484668910503387, 0.03239162638783455, 0.027370784431695938, -0.026576224714517593, -0.030335808172822, -0.01174556277692318, -0.021531768143177032, -0.03916730359196663, -0.003371238010004163, 0.015140564180910587, -0.2719140946865082, 0.02379138208925724, -0.01801246404647827, 0.04813192039728165, 0.019648727029561996, 0.04715722054243088, 0.060539424419403076, 0.026774127036333084, -0.06331443041563034, 0.012247247621417046, 0.027342498302459717, 0.01801193878054619, 0.008006356656551361, 0.04098953679203987, -0.01987193524837494, 0.05911718308925629, 0.006034219637513161, -0.06942290812730789, 0.021738512441515923, -0.05852094665169716, 0.019979525357484818, 0.06303815543651581, 0.20578068494796753, 0.009171704761683941, 0.014119775965809822, 0.06528609246015549, 0.02630046010017395, 0.05730719491839409, 0.04567192867398262, -0.003306472674012184, 0.033437129110097885, -0.006586055271327496, 0.07588420063257217, -0.0018456834368407726, 0.039509110152721405, 0.025270892307162285, -0.057506587356328964, 0.020284738391637802, -0.0008238994632847607, -0.010492963716387749, -0.08639920502901077, -0.02314903773367405, -0.054747968912124634, 0.014746531844139099, 0.11245408654212952, -0.037097543478012085, -0.06609134376049042, -0.07219119369983673, -0.06685879081487656, -0.012922842055559158, -0.009435288608074188, -0.03316780924797058, -0.022675441578030586, -0.0016631049802526832, 0.03986409679055214, 0.017700685188174248, -0.03972788527607918, -0.00020765172666870058, -0.04242513328790665, -0.018406016752123833, 0.009996452368795872, -0.03355807438492775, 0.005677924491465092, 0.05364294722676277, -0.014123265631496906 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
FastAPI returns an HTTP `200` status code by default; but in this instance, a `201` created is more appropriate. ##### Read Routes The application has two read routes: one for viewing all students and the other for viewing an individual student. ``` python @app.get( "/students/", response_description="List all students", response_model=StudentCollection, response_model_by_alias=False, ) async def list_students(): """ List all of the student data in the database. The response is unpaginated and limited to 1000 results. """ return StudentCollection(students=await student_collection.find().to_list(1000)) ``` Motor's `to_list` method requires a max document count argument. For this example, I have hardcoded it to `1000`; but in a real application, you would use the [skip and limit parameters in `find` to paginate your results.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.08843803405761719, -0.012546289712190628, 0.006548120640218258, -0.013807214796543121, 0.006571369711309671, -0.0006667625275440514, 0.0026781607884913683, 0.023186706006526947, 0.016790403053164482, 0.035735711455345154, 0.06728202849626541, -0.04253337159752846, 0.04577231779694557, 0.09549236297607422, -0.022397179156541824, 0.00789462961256504, 0.0014448196161538363, -0.01851237379014492, -0.021323006600141525, 0.04771631583571434, 0.07997287809848785, 0.006717071868479252, 0.013930367305874825, -0.04354235529899597, 0.022544246166944504, 0.04706106334924698, -0.039112988859415054, -0.023733876645565033, -0.0270453579723835, -0.22968226671218872, -0.022585000842809677, -0.08559895306825638, 0.04944545775651932, -0.05629059672355652, 0.012015102431178093, -0.034455545246601105, -0.0025399106089025736, 0.012622645124793053, -0.03302702307701111, 0.07107126712799072, 0.009091213345527649, 0.013581841252744198, -0.032764971256256104, 0.021440930664539337, -0.029416069388389587, -0.014225021935999393, -0.0683487206697464, 0.009696617722511292, 0.049566060304641724, -0.06280716508626938, -0.02252311073243618, 0.006036661099642515, 0.0037383632734417915, 0.021045999601483345, 0.03186899796128273, -0.004788015969097614, 0.028697960078716278, 0.08101748675107956, 0.004630615934729576, 0.023461103439331055, 0.027457209303975105, 0.03394968807697296, -0.15252447128295898, 0.04549587145447731, 0.0062988391146063805, 0.038525719195604324, -0.05366057530045509, -0.035892341285943985, 0.005081231705844402, 0.015758223831653595, -0.05926632881164551, 0.02924828603863716, -0.0070316544733941555, 0.10400664806365967, 0.035692766308784485, -0.03178645297884941, 0.013615347445011139, 0.004901444539427757, 0.024568280205130577, 0.024518080055713654, -0.026910187676548958, -0.07077960669994354, -0.025113657116889954, -0.032103486359119415, -0.005861642304807901, -0.04110609367489815, 0.010041573084890842, -0.004874379839748144, 0.08948848396539688, -0.003210508730262518, -0.00201418180949986, -0.034646593034267426, -0.0357760526239872, 0.02066386304795742, -0.0637446939945221, 0.0022784012835472822, 0.007037683390080929, 0.03923681378364563, -0.05202643945813179, 0.19652442634105682, -0.020241687074303627, 0.06133582070469856, -0.0004268979246262461, 0.022143090143799782, 0.029247041791677475, -0.033898163586854935, -0.0033066882751882076, 0.0007173119229264557, -0.026422441005706787, -0.021939901635050774, 0.008160869590938091, -0.033138178288936615, 0.03695616498589516, -0.05694984644651413, 0.04758106544613838, 0.04367474094033241, 0.00130868807900697, 0.047951359301805496, -0.04038437455892563, 0.013377596624195576, -0.010763722471892834, -0.01463682483881712, 0.06095543131232262, -0.03631916642189026, -0.02075263299047947, 0.006635351572185755, 0.08791591227054596, 0.10809937119483948, -0.003681799629703164, 0.07369088381528854, 0.04008777067065239, -0.0021502762101590633, -0.09407664090394974, -0.006263619288802147, -0.02792062796652317, -0.010596261359751225, 0.07895494252443314, 0.013420453295111656, 0.009438417851924896, -0.024844806641340256, -0.01204361766576767, -0.10612063109874725, -0.01063902024179697, -0.07527534663677216, -0.05405088886618614, 0.150160551071167, -0.040727365761995316, 0.037184055894613266, -0.08506662398576736, 0.00015906522457953542, -0.0006832574727013707, 0.022002600133419037, -0.04744352027773857, -0.07121298462152481, -0.030130967497825623, 0.04525397717952728, 0.04504505917429924, 0.07474029809236526, 0.029825231060385704, -0.019541533663868904, 0.005593123380094767, -0.06115749105811119, -0.0590653121471405, 0.054890744388103485, 0.02243896946310997, -0.07879174500703812, 0.018539445474743843, 0.003326076315715909, -0.055553704500198364, -0.019922547042369843, 0.010748563334345818, -0.027873646467924118, -0.054496511816978455, 0.03406281769275665, 0.08781854808330536, 0.04712452366948128, -0.02723258174955845, 0.0199187770485878, 0.006971882190555334, 0.04279555007815361, -0.029646525159478188, -0.01686360314488411, -0.058302149176597595, 0.06578260660171509, 0.04755696281790733, -0.021380113437771797, -0.011946304701268673, -0.020255904644727707, 0.04761139675974846, -0.001339599140919745, -0.044198863208293915, -0.01031210832297802, -0.05993838235735893, -0.016894958913326263, -0.04411475360393524, -0.021794192492961884, 0.0005641541793011129, 0.020561937242746353, 0.041132740676403046, -0.04480346664786339, 0.07627509534358978, 0.010775703005492687, -0.05087241530418396, 0.06126565858721733, -0.01733112335205078, 0.011332490481436253, -0.01222169492393732, -0.02591845951974392, 0.032485637813806534, 0.028026221320033073, -0.06083701178431511, 0.009484801441431046, 0.05695982649922371, 0.005820881109684706, -0.07418378442525864, -0.0036488499026745558, -0.009053098037838936, 0.07282755523920059, 0.01627148874104023, 0.029374029487371445, 0.009865477681159973, -0.08566966652870178, -0.02532173879444599, -0.26722970604896545, 0.059558264911174774, 0.016179252415895462, -0.04888957366347313, 0.00337978801690042, -0.06464622169733047, 0.01155261043459177, -0.006500516086816788, 0.03304309770464897, 0.07195836305618286, 0.10202979296445847, 0.002678906312212348, -0.01270120870321989, -0.005610458552837372, -0.04547327011823654, 0.04702942818403244, -0.007687079254537821, -0.008702586404979229, -0.04085925221443176, 0.0265230443328619, 0.027553100138902664, -0.016987310722470284, -0.05009503290057182, -0.0646601989865303, 0.020762423053383827, -0.04371112212538719, 0.24935756623744965, 0.014200091361999512, 0.031154686585068703, -0.05492185428738594, 0.0390891432762146, 0.00982380285859108, -0.013742903247475624, -0.10986145585775375, 0.03679285943508148, 0.03023279830813408, -0.0024449077900499105, 0.045127544552087784, 0.018665147945284843, -0.02787698060274124, 0.008313084952533245, 0.057295605540275574, -0.011945405043661594, -0.0770447626709938, -0.0006758486852049828, -0.02447771653532982, -0.025153860449790955, -0.012392163276672363, -0.045763421803712845, 0.017359940335154533, 0.0008589084609411657, 0.0031131678260862827, 0.038854412734508514, 0.06291806697845459, -0.0029929177835583687, -0.02218102663755417, -0.056959956884384155, -0.01527449581772089, -0.040792420506477356, 0.03883613646030426, -0.0306631401181221, -0.04600208252668381, 0.009600807912647724, -0.019626278430223465, 0.04926110804080963, -0.012948188930749893, -0.02465076744556427, -0.01822630874812603, 0.02222263440489769, -0.03302221745252609, 0.012407860718667507, 0.1313643455505371, -0.016283834353089333, 0.035725273191928864, 0.0023527357261627913, -0.01721699722111225, 0.043764155358076096, -0.021797584369778633, 0.03816328942775726, -0.02698787860572338, 0.041574738919734955, -0.02411610446870327, 0.0473174974322319, 0.008840207941830158, 0.023243412375450134, 0.000352949311491102, 0.03705618157982826, 0.0043848431669175625, 0.006070876494050026, -0.018235841765999794, -0.01533353142440319, 0.03678731620311737, -0.009431704878807068, -0.011580958031117916, 0.004672887735068798, -0.006133930757641792, -0.2743842601776123, 0.004983104299753904, -0.008927159011363983, 0.01616833545267582, -0.03649134933948517, 0.05600476637482643, 0.0737568810582161, 0.034398481249809265, -0.05259072408080101, 0.02592187188565731, -0.000021199801267357543, 0.05394469201564789, 0.016069762408733368, -0.017302175983786583, -0.005151188466697931, 0.057525668293237686, 0.012117312289774418, -0.010260275565087795, 0.019592633470892906, -0.04465723782777786, 0.05902404338121414, 0.006193794310092926, 0.19533409178256989, -0.02349228970706463, 0.028393398970365524, 0.07352009415626526, -0.00601681275293231, 0.040822241455316544, 0.04163713753223419, -0.017703428864479065, -0.007691124454140663, -0.008293756283819675, 0.08907567709684372, -0.06319404393434525, 0.0318327471613884, 0.007152188569307327, -0.04105549678206444, 0.003392457030713558, -0.006704600062221289, -0.02074599638581276, -0.04485917091369629, 0.015512436628341675, -0.04271779954433441, -0.03151620551943779, 0.1257152408361435, -0.004397223237901926, -0.0503409169614315, -0.07194647192955017, -0.02361891232430935, 0.026824994012713432, -0.056217342615127563, -0.02696097083389759, -0.04026583209633827, 0.015192272141575813, 0.08081892132759094, 0.006426409352570772, -0.0004252453800290823, -0.002595784841105342, -0.06509841233491898, -0.018370438367128372, 0.010714677162468433, -0.027720609679818153, 0.01871577836573124, 0.028429269790649414, -0.02798863872885704 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
``` python @app.get( "/students/{id}", response_description="Get a single student", response_model=StudentModel, response_model_by_alias=False, ) async def show_student(id: str): """ Get the record for a specific student, looked up by `id`. """ if ( student := await student_collection.find_one({"_id": ObjectId(id)}) ) is not None: return student raise HTTPException(status_code=404, detail=f"Student {id} not found") ``` The student detail route has a path parameter of `id`, which FastAPI passes as an argument to the `show_student` function. We use the `id` to attempt to find the corresponding student in the database. The conditional in this section is using an assignment expression, an addition to Python 3.8 and often referred to by the cute sobriquet "walrus operator."
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.05271805450320244, -0.020202862098813057, 0.027271287515759468, 0.0033538551069796085, 0.00918623898178339, -0.009227155707776546, 0.05800343304872513, 0.023984309285879135, 0.021717699244618416, 0.014004060067236423, 0.019657155498862267, -0.06508216261863708, 0.04738813266158104, 0.04852741211652756, -0.029210178181529045, -0.031261153519153595, -0.015386389568448067, 0.02224734053015709, -0.015062082558870316, 0.03153470531105995, 0.03669341653585434, -0.010682264342904091, -0.038714393973350525, -0.06350352615118027, 0.05407849699258804, 0.06871827691793442, -0.003676190972328186, -0.012060079723596573, -0.03418606147170067, -0.21157990396022797, 0.014935205690562725, -0.06633809953927994, 0.033217232674360275, -0.05081348866224289, 0.002598544117063284, 0.008273845538496971, -0.008794879540801048, 0.04735248163342476, -0.01130193006247282, 0.050635017454624176, 0.04907139018177986, -0.011934981681406498, -0.03292390704154968, -0.00019858962332364172, -0.0615072101354599, -0.016794880852103233, -0.04384705796837807, -0.04498693346977234, 0.0052460599690675735, -0.0784161388874054, -0.03062823973596096, -0.013891865499317646, -0.0016119114588946104, -0.00205504079349339, 0.012292154133319855, 0.05216604843735695, 0.0350118950009346, 0.06401445716619492, 0.041188422590494156, 0.03936492279171944, 0.011081678792834282, 0.03033250756561756, -0.15922443568706512, 0.06446550041437149, 0.03271865099668503, 0.04940224438905716, -0.022038938477635384, -0.07182157784700394, 0.042212869971990585, 0.01002510730177164, -0.029807183891534805, -0.004320432431995869, 0.007757189683616161, 0.10858618468046188, 0.014530868269503117, -0.03455603867769241, 0.022160295397043228, -0.009162697941064835, 0.036123696714639664, -0.002555103739723563, -0.04602561146020889, -0.038346435874700546, -0.006525097414851189, -0.016972672194242477, 0.015245386399328709, -0.040083229541778564, 0.02667596936225891, -0.06521297991275787, 0.06569348275661469, 0.0073350840248167515, -0.02371295727789402, -0.007689211517572403, -0.04190955311059952, 0.05914250388741493, -0.05738331004977226, 0.02030973881483078, 0.010875125415623188, 0.04896964505314827, -0.051270127296447754, 0.19340330362319946, -0.04882264509797096, 0.03905041888356209, 0.028225181624293327, 0.01665174961090088, 0.02365046925842762, -0.028339426964521408, -0.01104911882430315, -0.02671673707664013, 0.006315160077065229, -0.01596788689494133, -0.011366802267730236, -0.03476212918758392, 0.02267826907336712, -0.05250415578484535, 0.01549016684293747, 0.03598986938595772, 0.03187072277069092, 0.041416168212890625, -0.04629167541861534, -0.02278636209666729, -0.0049092997796833515, -0.0018890980863943696, 0.03574901074171066, 0.009267693385481834, -0.011276265606284142, -0.02080703340470791, 0.06497281044721603, 0.1370897740125656, -0.002286615315824747, 0.06518822908401489, 0.04542604461312294, -0.047972723841667175, -0.07651428878307343, -0.021242789924144745, -0.005303551908582449, -0.009160203859210014, 0.0037305615842342377, -0.006552649661898613, -0.013341826386749744, -0.0017208729404956102, -0.03260699659585953, -0.12663869559764862, -0.049279432743787766, -0.06059225648641586, -0.07614126801490784, 0.13960450887680054, -0.028764374554157257, 0.0743803158402443, -0.043982185423374176, -0.02054133452475071, -0.03901068493723869, 0.011917198076844215, -0.05716792494058609, -0.015223797410726547, -0.025931958109140396, 0.0443006195127964, 0.04904273524880409, 0.07523077726364136, 0.007721312809735537, -0.0073813628405332565, -0.03024655021727085, -0.05308486893773079, -0.03233153745532036, 0.09008688479661942, -0.012566016986966133, -0.09184034913778305, 0.008172852918505669, -0.0027498602867126465, -0.02751540020108223, -0.047086216509342194, 0.016797980293631554, 0.038721926510334015, -0.061052244156599045, 0.01487693190574646, 0.06574205309152603, 0.011558800004422665, -0.04038066044449806, 0.008172361180186272, -0.00757864722982049, 0.025161847472190857, -0.00739101180806756, -0.025532634928822517, -0.03465748950839043, 0.008342275395989418, 0.03991563990712166, -0.043614186346530914, -0.03044862486422062, -0.04840253293514252, 0.03168643265962601, 0.010298130102455616, -0.022836657240986824, -0.00007992883183760568, -0.011113777756690979, -0.03778018057346344, -0.06012384220957756, -0.04078563675284386, 0.012603111565113068, -0.014005296863615513, 0.01570988819003105, 0.005118076223880053, 0.09022795408964157, 0.032263945788145065, -0.03021886944770813, 0.04313535988330841, -0.0318995825946331, 0.012677619233727455, -0.003267090069130063, -0.020847724750638008, 0.020350703969597816, 0.00863824225962162, -0.03911423683166504, 0.0070061758160591125, 0.0321836844086647, -0.012822462245821953, -0.06369604915380478, -0.027651606127619743, 0.03899944946169853, 0.04764261841773987, 0.05312484875321388, 0.031846776604652405, -0.014960283413529396, -0.06556425243616104, 0.013228542171418667, -0.2615772485733032, 0.03657577931880951, 0.011039945296943188, -0.002064343774691224, -0.005730677396059036, -0.04700911417603493, -0.005385640077292919, -0.007048023398965597, -0.023230111226439476, 0.08222801983356476, 0.08217908442020416, -0.016600046306848526, 0.007944399490952492, 0.026271309703588486, -0.04007115960121155, 0.0595414824783802, 0.020643016323447227, 0.0011645198101177812, -0.03550399839878082, -0.021372457966208458, -0.004523865878582001, -0.013361934572458267, -0.02651316486299038, -0.07292147725820541, 0.011885669082403183, -0.031063565984368324, 0.2832285463809967, 0.07634543627500534, 0.02484189160168171, -0.026198221370577812, 0.042162273079156876, -0.008482643403112888, -0.03284238278865814, -0.13094332814216614, 0.02958022430539131, 0.04151500016450882, 0.01240652147680521, -0.015906019136309624, 0.02318492904305458, -0.047668248414993286, 0.01762204058468342, 0.03129656985402107, 0.022238096222281456, -0.05979892984032631, -0.0256070364266634, -0.01733449101448059, -0.025005098432302475, -0.006952221039682627, -0.024103371426463127, 0.09062051773071289, 0.031275425106287, 0.027969909831881523, 0.047803085297346115, 0.024629071354866028, -0.02126397378742695, -0.006589966826140881, -0.060097526758909225, -0.006096495781093836, -0.026307811960577965, 0.0711509957909584, -0.01551111601293087, -0.05885053053498268, 0.01058672834187746, -0.027374744415283203, 0.03731057420372963, -0.02930120751261711, 0.001547324238345027, -0.06999649852514267, 0.024232206866145134, -0.045854393392801285, -0.008102254942059517, 0.0846499353647232, 0.0038256605621427298, 0.03396250680088997, 0.027406426146626472, 0.0055764843709766865, 0.06744653731584549, -0.051689524203538895, 0.015933649614453316, -0.013111517764627934, 0.02759215421974659, -0.047207631170749664, 0.030313188210129738, -0.028756501153111458, 0.04351065307855606, 0.0016545321559533477, 0.0734475776553154, 0.013208623975515366, 0.04900265485048294, -0.007585420738905668, -0.030923914164304733, -0.008199508301913738, -0.02354983240365982, 0.0018315084744244814, 0.0019679577089846134, 0.04139287397265434, -0.2808868885040283, 0.026858454570174217, 0.007075735833495855, 0.029451217502355576, -0.013698756694793701, 0.03778032585978508, 0.07396972924470901, -0.008435873314738274, -0.033457398414611816, -0.030564509332180023, 0.014131960459053516, -0.009001349098980427, 0.042247846722602844, 0.03303629532456398, -0.028451213613152504, 0.05911920219659805, 0.03716837242245674, -0.026065858080983162, 0.027303840965032578, -0.030448168516159058, 0.05670807510614395, 0.0405106395483017, 0.2011142522096634, -0.018120234832167625, 0.0882403627038002, 0.052879031747579575, -0.0003775184159167111, 0.02461637370288372, 0.04676526039838791, -0.018770921975374222, 0.03341657668352127, -0.0466880276799202, 0.09558837860822678, -0.045721665024757385, 0.06163349002599716, 0.04132848605513573, -0.02256970852613449, 0.041135091334581375, -0.0025253533385694027, -0.011734092608094215, -0.046860575675964355, -0.009217523038387299, -0.07287615537643433, -0.00033079940476454794, 0.11984313279390335, 0.0059311892837285995, -0.021665679290890694, -0.055305153131484985, -0.03952676057815552, -0.005933012813329697, -0.007290719076991081, -0.046370673924684525, -0.06653714179992676, -0.008735503070056438, 0.07780823111534119, 0.026204915717244148, -0.03014444001019001, -0.01676788367331028, -0.06925653666257858, -0.03219195827841759, 0.005650858860462904, -0.02500191144645214, 0.030381018295884132, 0.030633611604571342, -0.006876327097415924 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
If a document with the specified `_id` does not exist, we raise an `HTTPException` with a status of `404`. ##### Update Route ``` python @app.put( "/students/{id}", response_description="Update a student", response_model=StudentModel, response_model_by_alias=False, ) async def update_student(id: str, student: UpdateStudentModel = Body(...)): """ Update individual fields of an existing student record. Only the provided fields will be updated. Any missing or `null` fields will be ignored. """ student = { k: v for k, v in student.model_dump(by_alias=True).items() if v is not None }
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.058181606233119965, -0.022254060953855515, 0.07874832302331924, 0.00841868668794632, 0.015794651582837105, 0.014692680910229683, -0.032130129635334015, 0.05233578383922577, -0.008255082182586193, 0.0064775641076266766, 0.0390380434691906, -0.05819912254810333, 0.05646508187055588, 0.055268071591854095, -0.03340993821620941, -0.02337734028697014, -0.046865977346897125, 0.003072500927373767, -0.027791984379291534, 0.03858558088541031, 0.04412573575973511, 0.018418747931718826, 0.007958503440022469, -0.006926920730620623, -0.010286316275596619, 0.06557084619998932, -0.0181729719042778, 0.021923601627349854, -0.06604168564081192, -0.2008989453315735, -0.00283710565418005, -0.07462149858474731, -0.018969979137182236, -0.025529174134135246, 0.012469119392335415, -0.01381900254637003, 0.006798597984015942, 0.03818238899111748, 0.032028429210186005, 0.06816734373569489, 0.008733089081943035, -0.02993110567331314, -0.04619167745113373, -0.03957975283265114, -0.0357145257294178, -0.010258250869810581, -0.004714317619800568, -0.03556568920612335, 0.0558219775557518, -0.0515269972383976, -0.04646044597029686, -0.038758549839258194, 0.015376420691609383, -0.012030459009110928, 0.008271262049674988, 0.0350993350148201, 0.05079894885420799, 0.02184239774942398, 0.029047897085547447, 0.03095206432044506, 0.05682368576526642, 0.06669523566961288, -0.13809902966022491, 0.09212055057287216, 0.03645500913262367, 0.036414388567209244, -0.031006816774606705, -0.09363840520381927, 0.07007566839456558, 0.02341398596763611, -0.0372600220143795, 0.00003148875475744717, -0.0017245864728465676, 0.12684960663318634, 0.04347892850637436, -0.0001782756153261289, 0.03558012470602989, 0.0013289988273754716, 0.02105945162475109, 0.022172685712575912, -0.03498923033475876, -0.05457047000527382, -0.011014582589268684, -0.018913771957159042, -0.01136896014213562, -0.02578788623213768, 0.02460118755698204, -0.06411901116371155, 0.03579369932413101, 0.004857189487665892, -0.02503119222819805, 0.005136693827807903, 0.0019279767293483019, 0.04937169328331947, -0.08181962370872498, 0.01660924404859543, -0.008404659107327461, 0.03976907208561897, -0.061792828142642975, 0.23590531945228577, -0.03107096627354622, 0.030739419162273407, 0.039644356817007065, 0.012242053635418415, 0.0149965425953269, -0.04212531819939613, -0.023408250883221626, -0.015690496191382408, -0.010449831373989582, 0.014087979681789875, -0.006964335683733225, -0.035315800458192825, 0.017815353348851204, -0.02232966013252735, -0.0015578598249703646, 0.052738986909389496, 0.04871831834316254, 0.06862284243106842, -0.06247708946466446, -0.043061263859272, -0.012843427248299122, 0.01714523509144783, 0.08018927276134491, -0.02139998786151409, -0.0013073249720036983, -0.03853987529873848, 0.0657656192779541, 0.1168811172246933, -0.012063675560057163, 0.06638984382152557, 0.04131290316581726, -0.032644666731357574, -0.08400053530931473, -0.051750071346759796, 0.0036046442110091448, -0.036446597427129745, 0.015022477135062218, 0.00098134926520288, 0.007770400028675795, 0.0065996176563203335, -0.029054608196020126, -0.13270148634910583, -0.059936653822660446, -0.03991062566637993, -0.05112595483660698, 0.12290900200605392, 0.030577080324292183, 0.04065034165978432, -0.03407806158065796, -0.034824151545763016, -0.006548909470438957, 0.028460493311285973, -0.0971822515130043, -0.010182799771428108, 0.0007577306823804975, 0.015067043714225292, 0.01919115148484707, 0.06603739410638809, -0.01067535113543272, -0.0024367135483771563, -0.010544838383793831, -0.05630442500114441, -0.06604275107383728, 0.11005838960409164, 0.0012706919806078076, -0.10456208884716034, -0.016811713576316833, -0.022864950820803642, -0.03140559792518616, 0.004257946740835905, 0.01008959673345089, 0.011100846342742443, -0.04668128490447998, 0.03545304387807846, 0.08038702607154846, 0.050323933362960815, -0.020037611946463585, 0.006489566061645746, 0.0064679826609790325, 0.021326012909412384, 0.015720734372735023, -0.01406621653586626, -0.040548499673604965, -0.0003319819224998355, 0.013538391329348087, -0.04404528811573982, -0.014775040559470654, -0.0092489467933774, 0.03627212718129158, 0.033030543476343155, -0.031149666756391525, -0.009798572398722172, 0.01793556846678257, -0.031729139387607574, -0.024744706228375435, -0.02533891797065735, -0.025660470128059387, -0.03480834513902664, 0.055694133043289185, -0.06426090747117996, 0.10725222527980804, 0.023786775767803192, -0.019191987812519073, 0.012929883785545826, -0.018704494461417198, -0.021298112347722054, -0.008999558165669441, 0.01503074448555708, 0.011782726272940636, 0.020998187363147736, -0.06253398954868317, -0.010668664239346981, 0.04535185918211937, -0.03139793872833252, -0.0266435407102108, -0.021448835730552673, -0.00003539745739544742, 0.05241178348660469, 0.04581838473677635, 0.03842923417687416, 0.007541739381849766, -0.03784976154565811, 0.027100076898932457, -0.26496997475624084, 0.029757622629404068, -0.01496030855923891, -0.027405954897403717, -0.02066350169479847, -0.0460771769285202, 0.01454966887831688, 0.008452578447759151, -0.03918703272938728, 0.09341507405042648, 0.07670731842517853, 0.006589104887098074, -0.010611922480165958, 0.005930360872298479, -0.01984592154622078, 0.023522324860095978, 0.011463684029877186, -0.03378397226333618, -0.04560341686010361, 0.016406046226620674, -0.006010602694004774, -0.021059755235910416, -0.029094425961375237, -0.07615872472524643, 0.023434177041053772, -0.036245197057724, 0.25057095289230347, 0.07785078883171082, 0.0154816759750247, -0.0648641288280487, 0.020330561324954033, 0.0553983598947525, 0.0075195771642029285, -0.1472553014755249, 0.05037982389330864, 0.02213304489850998, 0.008807476609945297, -0.01925145648419857, 0.011264790780842304, -0.04415296018123627, 0.03494374454021454, 0.040382783859968185, -0.002556932857260108, -0.09461221843957901, 0.0010429086396470666, -0.0081212492659688, -0.03857314586639404, -0.009091459214687347, -0.01432930026203394, 0.04690272733569145, 0.024265503510832787, 0.01869019865989685, 0.05404684692621231, 0.03565681353211403, -0.02970561571419239, -0.02516118437051773, -0.03126772120594978, 0.012599622830748558, -0.010997713543474674, 0.04588200896978378, -0.019685810431838036, -0.0201420895755291, 0.04494137689471245, -0.016584284603595734, 0.07832090556621552, -0.01586359739303589, 0.031240984797477722, -0.04800296947360039, 0.03446211665868759, -0.04960992559790611, -0.026183564215898514, 0.09336106479167938, 0.007896384224295616, 0.015584411099553108, -0.010245446115732193, 0.022272320464253426, 0.03188351169228554, -0.041220419108867645, -0.024199312552809715, -0.019358405843377113, 0.0032358441967517138, -0.039258379489183426, 0.06256713718175888, 0.004281398840248585, 0.0382358618080616, 0.04697001725435257, -0.011899012140929699, -0.0005336702452041209, 0.051506657153367996, -0.03619733825325966, -0.014493112452328205, -0.009549652226269245, -0.04659470170736313, 0.0005554682575166225, 0.024328604340553284, -0.016939185559749603, -0.2532486021518707, 0.005737087223678827, -0.011602680198848248, 0.043662816286087036, -0.03937185928225517, 0.05585689842700958, 0.052876606583595276, 0.035413581877946854, -0.03721491992473602, -0.003268590895459056, 0.0162105280905962, -0.003662701928988099, 0.007647193968296051, -0.02382914163172245, -0.026337984949350357, 0.05655253306031227, 0.0012620538473129272, -0.03960093483328819, 0.018077753484249115, -0.06254349648952484, 0.019855277612805367, 0.07660228759050369, 0.20441852509975433, -0.003230511909350753, 0.0319984070956707, 0.059122588485479355, 0.004086068831384182, 0.07565829902887344, 0.06694356352090836, 0.003214621916413307, 0.014467453584074974, -0.014541028998792171, 0.08007492870092392, -0.006560045760124922, 0.060234904289245605, -0.02520369365811348, -0.033730167895555496, 0.018292250111699104, -0.01144106313586235, -0.04351532459259033, -0.05909799039363861, 0.0085917878895998, -0.029695795848965645, 0.000596399127971381, 0.08128159493207932, -0.00959184393286705, -0.047361232340335846, -0.05727926269173622, -0.04937838390469551, 0.016456715762615204, -0.04076013341546059, -0.03161746636033058, -0.056900691241025925, 0.04640856757760048, 0.05392053350806236, 0.053374033421278, -0.030930770561099052, -0.05466625094413757, -0.06287215650081635, -0.043424393981695175, 0.04082091152667999, -0.029062384739518166, -0.016643714159727097, 0.023197315633296967, -0.007292138412594795 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
if len(student) >= 1: update_result = await student_collection.find_one_and_update( {"_id": ObjectId(id)}, {"$set": student}, return_document=ReturnDocument.AFTER, ) if update_result is not None: return update_result else: raise HTTPException(status_code=404, detail=f"Student {id} not found") # The update is empty, but we should still return the matching document: if (existing_student := await student_collection.find_one({"_id": id})) is not None: return existing_student raise HTTPException(status_code=404, detail=f"Student {id} not found") ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.07646340131759644, -0.003919348120689392, 0.053970757871866226, -0.0025844797492027283, 0.027997590601444244, 0.02127731963992119, 0.01200995221734047, 0.03355879709124565, 0.024608004838228226, -0.00607854500412941, 0.018509235233068466, -0.06335566192865372, 0.0245219673961401, 0.04015521705150604, -0.06019510328769684, -0.008745122700929642, -0.029991280287504196, 0.009406100027263165, -0.05493079870939255, 0.013260004110634327, 0.0477190837264061, -0.007365074940025806, -0.030740125104784966, -0.048521481454372406, 0.03264161944389343, 0.048348166048526764, -0.01066394429653883, -0.004816048312932253, -0.046260710805654526, -0.21353787183761597, -0.004845632705837488, -0.05740831792354584, -0.00945652648806572, -0.030627712607383728, 0.03277886286377907, -0.011149829253554344, 0.009936925023794174, 0.054649002850055695, 0.008734420873224735, 0.07112552970647812, 0.028001880273222923, -0.018353650346398354, -0.03138464316725731, -0.05367451161146164, -0.0586383193731308, -0.03273994103074074, -0.022197220474481583, -0.04120438173413277, 0.05880796164274216, -0.06409100443124771, -0.04510081559419632, -0.03426080569624901, -0.006769652012735605, 0.0015865213936194777, 0.0050278035923838615, 0.03587750345468521, 0.05779712647199631, 0.03551771119236946, 0.010995478369295597, 0.010038090869784355, 0.02273225411772728, 0.03266029804944992, -0.16712117195129395, 0.07893747091293335, 0.05189215764403343, 0.01989305578172207, -0.026698971167206764, -0.08058992028236389, 0.07586629688739777, 0.031488630920648575, -0.01197566743940115, 0.00956563651561737, 0.028087900951504707, 0.1025262251496315, 0.054921090602874756, 0.007628999184817076, 0.014847749844193459, -0.02471744269132614, 0.03608470782637596, 0.04537220671772957, -0.08889583498239517, -0.03914329782128334, -0.024869980290532112, -0.04468702897429466, 0.002661078004166484, -0.06344422698020935, 0.027330709621310234, -0.05591113120317459, 0.054302483797073364, 0.006087793968617916, -0.03900827467441559, 0.025645539164543152, 0.009721610695123672, 0.05138590931892395, -0.07797420769929886, 0.005206398665904999, 0.009222974069416523, 0.05119779333472252, -0.032810028642416, 0.2257736325263977, -0.033948834985494614, 0.025488002225756645, 0.025812173262238503, -0.011971769854426384, 0.016987770795822144, -0.038216445595026016, -0.00122180359903723, -0.008771645836532116, 0.0013123232638463378, -0.023343537002801895, 0.0255708210170269, -0.04149669036269188, 0.046138912439346313, -0.013674999587237835, -0.014074161648750305, 0.0551166906952858, 0.07424826920032501, 0.05266471207141876, -0.04471947252750397, -0.018125472590327263, -0.010035750456154346, -0.006370816845446825, 0.06753385066986084, -0.04095654934644699, -0.02607312612235546, -0.03515545651316643, 0.10435113310813904, 0.1135159581899643, -0.032747842371463776, 0.07070005685091019, 0.03451603278517723, -0.06614448130130768, -0.08862818777561188, -0.04743412137031555, 0.003088772762566805, 0.007515227422118187, -0.011112382635474205, 0.042549993842840195, 0.006886838469654322, -0.006611137185245752, -0.008333289064466953, -0.1353137344121933, -0.05113791674375534, -0.07240508496761322, -0.044900499284267426, 0.14517857134342194, -0.01164492592215538, 0.06961042433977127, -0.0635051429271698, -0.046278201043605804, -0.02272685617208481, 0.050757501274347305, -0.07619018107652664, -0.02409551292657852, 0.00876531284302473, 0.002450597006827593, 0.04224397614598274, 0.02546709030866623, 0.0016610723687335849, -0.000776861677877605, -0.023686839267611504, -0.030420510098338127, -0.07565335184335709, 0.06981169432401657, -0.0051210797391831875, -0.07549973577260971, -0.0320768840610981, -0.02419646456837654, -0.0217336043715477, -0.041094329208135605, 0.04045325145125389, 0.04719724506139755, -0.03602929413318634, 0.00038554001366719604, 0.0949956476688385, 0.03632477670907974, -0.03636787459254265, 0.0005709084798581898, 0.007651422172784805, 0.04052545130252838, 0.0011340203927829862, -0.013849887065589428, -0.03564077988266945, 0.024035200476646423, 0.01902664639055729, -0.028239451348781586, -0.011518876068294048, -0.021991916000843048, 0.034979287534952164, 0.05936247855424881, -0.019136926159262657, -0.01745852269232273, 0.019172776490449905, -0.034535083919763565, -0.02518131025135517, -0.05163608118891716, -0.056798312813043594, -0.04522945359349251, 0.02125774323940277, -0.025859832763671875, 0.08674700558185577, 0.04256545007228851, 0.002026222413405776, 0.005600868258625269, -0.0051145004108548164, 0.012618214823305607, 0.0013205220457166433, -0.005473869387060404, 0.04158512130379677, 0.03143040090799332, -0.04488368704915047, 0.000007840575563022867, 0.007684017065912485, -0.03962680324912071, -0.03206583485007286, -0.01518216822296381, 0.026367604732513428, 0.05535955727100372, 0.023524219170212746, 0.019639359787106514, 0.018780555576086044, -0.07399076223373413, 0.05086654797196388, -0.2546111047267914, 0.022645005956292152, -0.006888417061418295, -0.004990123212337494, 0.01116489339619875, 0.003213301533833146, 0.044654957950115204, 0.0004559775989037007, -0.05266738310456276, 0.08034896105527878, 0.029690006747841835, -0.009673218242824078, -0.005558579228818417, 0.01916373148560524, -0.01758958399295807, 0.02939259074628353, 0.026923498138785362, 0.005185638554394245, -0.017707156017422676, 0.0045045060105621815, -0.0019069145200774074, -0.00205051782540977, -0.025547964498400688, -0.09017731249332428, 0.04167259857058525, -0.044551242142915726, 0.20217496156692505, 0.04465893656015396, 0.003972536884248257, -0.0563812181353569, 0.0287637896835804, 0.03320394456386566, -0.013597498647868633, -0.09782105684280396, 0.05671289935708046, 0.04803119972348213, 0.0014976499369367957, -0.024180002510547638, 0.0023431682493537664, -0.04267014190554619, 0.05417003110051155, 0.0320662185549736, 0.0013587191933766007, -0.07836996018886566, -0.01345084048807621, -0.023555753752589226, -0.036668263375759125, 0.006835266016423702, -0.024804476648569107, 0.06474975496530533, 0.016201382502913475, 0.002268050564453006, 0.03551843389868736, 0.003612793982028961, -0.055304959416389465, -0.03618402034044266, -0.06258706748485565, 0.011900954879820347, 0.004433855880051851, 0.04597344249486923, -0.01615496538579464, -0.01632852666079998, 0.04656514152884483, -0.009144858457148075, 0.07337302714586258, -0.006192180328071117, 0.01588425412774086, -0.04350718483328819, 0.013541294261813164, -0.07053151726722717, 0.008472058922052383, 0.0675770714879036, 0.005128104705363512, 0.033578161150217056, -0.024269066751003265, 0.03463252633810043, 0.0661948174238205, -0.03645610809326172, -0.02011459693312645, 0.0007480783970095217, 0.03302783519029617, -0.06126692518591881, 0.06100034341216087, 0.006771181244403124, 0.023243296891450882, 0.03552170842885971, 0.03164614364504814, 0.03122006170451641, 0.013552213087677956, -0.04327305778861046, -0.0277312770485878, 0.0027275760658085346, -0.028767522424459457, -0.00919501855969429, 0.01759960874915123, 0.032152701169252396, -0.2845367193222046, 0.024574071168899536, 0.01533916499465704, 0.04532098397612572, -0.030238987877964973, 0.04084267467260361, 0.07052090764045715, 0.014839733019471169, -0.03818494454026222, -0.009883417747914791, 0.007714978884905577, -0.0008112516952678561, 0.0014712547417730093, -0.0008955635712482035, -0.03886423632502556, 0.055546507239341736, 0.029079735279083252, -0.03940395638346672, 0.03358302637934685, -0.04637455567717552, 0.025572383776307106, 0.08800799399614334, 0.2154337614774704, -0.0014117906102910638, 0.0475677065551281, 0.019429702311754227, 0.03707129508256912, 0.03766242414712906, 0.06538910418748856, -0.023097436875104904, -0.0003696461208164692, 0.011555013246834278, 0.051259733736515045, -0.04225163906812668, 0.05379344895482063, 0.027148764580488205, -0.06419426947832108, 0.009814669378101826, 0.002065570093691349, -0.02421376295387745, -0.048899441957473755, 0.022374214604496956, -0.052763864398002625, -0.007426219526678324, 0.13289475440979004, -0.023136937990784645, -0.03386079892516136, -0.0426553413271904, -0.06021295115351677, -0.0020892727188766003, -0.07972823083400726, -0.012932426296174526, -0.024353623390197754, 0.016015896573662758, 0.06361404806375504, 0.04884941875934601, -0.04990943521261215, -0.02162165939807892, -0.06012667715549469, -0.048771824687719345, 0.029715266078710556, -0.004274691920727491, -0.013354538939893246, 0.02825949899852276, 0.00008581415750086308 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
raise HTTPException(status_code=404, detail=f"Student {id} not found") ``` The `update_student` route is like a combination of the `create_student` and the `show_student` routes. It receives the `id` of the document to update as well as the new data in the JSON body. We don't want to update any fields with empty values; so, first of all, we iterate over all the items in the received dictionary and only add the items that have a value to our new document. If, after we remove the empty values, there are no fields left to update, we instead look for an existing record that matches the `id` and return that unaltered. However, if there are values to update, we use find_one_and_update to $set the new values, and then return the updated document.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.08804577589035034, -0.01666226051747799, 0.07870104908943176, -0.000939752149861306, 0.030516302213072777, 0.020044341683387756, -0.011871187016367912, 0.04733797162771225, 0.0004857280873693526, 0.02439991384744644, 0.03992502763867378, -0.03405192494392395, 0.03859996050596237, 0.05143630504608154, -0.030859695747494698, -0.0021622232161462307, -0.039278723299503326, 0.0011860211379826069, -0.054394688457250595, 0.023423895239830017, 0.040222056210041046, 0.004707372281700373, -0.009461737237870693, -0.028661688789725304, 0.02288256399333477, 0.07393302768468857, -0.027644101530313492, 0.012219879776239395, -0.04815792664885521, -0.20923522114753723, 0.017616499215364456, -0.07191937416791916, -0.006612532306462526, -0.012536286376416683, -0.0032535081263631582, -0.0291999913752079, 0.019191889092326164, 0.043733078986406326, 0.019026687368750572, 0.08656945079565048, 0.01369555201381445, -0.03677789494395256, -0.0653899684548378, -0.05213969945907593, -0.06013311818242073, -0.019297756254673004, -0.015455223619937897, -0.027697423473000526, 0.06527066230773926, -0.07135049998760223, -0.044377487152814865, -0.05592118948698044, -0.0018930997466668487, -0.009353304281830788, 0.00923172477632761, 0.03212631866335869, 0.05235830321907997, 0.0335666686296463, 0.02617938257753849, 0.026165178045630455, 0.041958894580602646, 0.05570751428604126, -0.14114294946193695, 0.08854777365922928, 0.02691859006881714, 0.019085360690951347, -0.016878999769687653, -0.08414731174707413, 0.06928343325853348, -0.00929204374551773, -0.01783357374370098, 0.01324514951556921, 0.013936742208898067, 0.11600976437330246, 0.062119755893945694, -0.009422817267477512, 0.022190488874912262, 0.009456108324229717, 0.03796342760324478, 0.04263342171907425, -0.04698435962200165, -0.04733206331729889, -0.004672725684940815, -0.014094480313360691, -0.004114380106329918, -0.044349756091833115, 0.017897140234708786, -0.07485242187976837, 0.052872184664011, -0.007644587196409702, -0.03692556172609329, -0.007225971668958664, -0.012541297823190689, 0.06356208771467209, -0.08599959313869476, 0.015156388282775879, -0.01802542433142662, 0.04911814630031586, -0.05058153718709946, 0.21274422109127045, -0.044878438115119934, 0.03390652686357498, 0.03602133318781853, 0.008020884357392788, 0.008472906425595284, -0.05027424171566963, -0.013047396205365658, 0.0013204587157815695, -0.007447795011103153, 0.011658098548650742, 0.0018339203670620918, -0.001000613789074123, 0.020732810720801353, -0.006436405703425407, -0.003103570081293583, 0.05363655090332031, 0.045172207057476044, 0.05592193454504013, -0.0632423684000969, -0.008749576285481453, 0.008788127452135086, 0.016339151188731194, 0.05956864356994629, -0.02512965351343155, -0.015582391060888767, -0.03721192106604576, 0.08374141156673431, 0.10849159955978394, -0.007498213555663824, 0.07467827200889587, 0.03539733588695526, -0.011216189712285995, -0.08804096281528473, -0.03906268626451492, -0.01207310426980257, -0.00414757477119565, 0.0037349823396652937, 0.004642687272280455, 0.005089819896966219, -0.00020143850997556, -0.04383274167776108, -0.09659478068351746, -0.05564099922776222, -0.07829678058624268, -0.05671345442533493, 0.12392878532409668, 0.009118077345192432, 0.06933054327964783, -0.025432303547859192, -0.031739648431539536, -0.022747574374079704, 0.042209040373563766, -0.08427829295396805, -0.026300711557269096, -0.01257767342031002, 0.023513980209827423, 0.03715740889310837, 0.04093872755765915, 0.006227012723684311, -0.0030954373069107533, -0.02527262084186077, -0.056615911424160004, -0.0626482293009758, 0.0848756730556488, -0.018096696585416794, -0.10140158236026764, -0.0026053180918097496, -0.023732280358672142, -0.023940764367580414, -0.016906173899769783, 0.029674071818590164, 0.0437530055642128, -0.05412384495139122, 0.018022000789642334, 0.11220378428697586, 0.050893936306238174, -0.013899975456297398, 0.00916392169892788, 0.01817038469016552, -0.005691822152584791, 0.005572868045419455, -0.024729950353503227, -0.050950028002262115, 0.03111342526972294, 0.005336713045835495, -0.049251340329647064, 0.0026396424509584904, -0.02791060321033001, 0.04495912045240402, 0.05494686961174011, -0.03909573704004288, 0.00284736230969429, 0.008780164644122124, -0.05255885422229767, -0.03423730656504631, -0.031717296689748764, -0.02474362403154373, -0.04813377559185028, 0.02090144157409668, -0.03144485875964165, 0.0937608927488327, 0.039409223943948746, -0.012867657467722893, 0.019639309495687485, -0.014192941598594189, -0.002604719717055559, 0.008669685572385788, -0.002936137141659856, 0.038488470017910004, 0.02021031640470028, -0.045615363866090775, 0.016824351623654366, 0.015764767304062843, -0.032368067651987076, -0.035974908620119095, -0.027702750638127327, -0.0003179143532179296, 0.041587136685848236, 0.04018782079219818, 0.027038883417844772, 0.00010502032091608271, -0.05487668514251709, 0.03850417211651802, -0.2757508158683777, 0.023767033591866493, 0.012189306318759918, -0.03585311397910118, -0.014346322976052761, -0.012822937220335007, 0.023665843531489372, 0.0021118440199643373, -0.029189998283982277, 0.08675293624401093, 0.07650443911552429, -0.015102239325642586, 0.016241412609815598, 0.008708378300070763, -0.0024528601206839085, 0.030497800558805466, 0.03209987282752991, -0.021600928157567978, -0.02169857919216156, -0.002669542795047164, -0.009317606687545776, -0.00005926184167037718, -0.021006617695093155, -0.09727173298597336, 0.0297441054135561, -0.048718035221099854, 0.23381122946739197, 0.06967208534479141, 0.009679706767201424, -0.06288734823465347, 0.028778553009033203, 0.05679727718234062, -0.011136334389448166, -0.11473532766103745, 0.036930471658706665, 0.0237576887011528, 0.0057037328369915485, -0.004542984068393707, 0.01837019994854927, -0.047908712178468704, 0.02816176973283291, 0.016590693965554237, -0.001860284712165594, -0.09139598160982132, 0.004725042264908552, -0.015193610452115536, -0.036397986114025116, -0.018282122910022736, -0.038664281368255615, 0.05163221433758736, 0.027694780379533768, 0.03045097179710865, 0.06884219497442245, 0.011825557798147202, -0.06179619953036308, -0.027871742844581604, -0.025746464729309082, 0.01418529823422432, -0.0023002580273896456, 0.06309386342763901, -0.01885613426566124, -0.0009119625901803374, 0.03717700019478798, -0.005393255036324263, 0.0726023018360138, -0.01821751892566681, 0.03503146395087242, -0.03500860184431076, 0.030559780076146126, -0.07546389102935791, -0.039831701666116714, 0.05312052369117737, 0.021909793838858604, 0.04946660250425339, -0.013400636613368988, 0.031156638637185097, 0.022943217307329178, -0.06220412999391556, -0.012046108953654766, 0.007173384074121714, 0.015041636303067207, -0.03764324262738228, 0.04036541283130646, 0.008066936396062374, 0.022394709289073944, 0.0477118119597435, 0.0052785249426960945, 0.017423896118998528, 0.014355271123349667, -0.04062953591346741, -0.029130976647138596, 0.002602056134492159, -0.04949324578046799, -0.007367619778960943, 0.03233635798096657, 0.011458256281912327, -0.2754836082458496, 0.010073197074234486, 0.006117902230471373, 0.014921764843165874, -0.03241023048758507, 0.05667629837989807, 0.06188291683793068, 0.037506747990846634, -0.02776821330189705, -0.0002533980878069997, 0.010369157418608665, -0.012133514508605003, 0.0024555667769163847, -0.028898540884256363, -0.015086674131453037, 0.05972062051296234, 0.003758305450901389, -0.029623426496982574, 0.02233809605240822, -0.05335249751806259, 0.038284458220005035, 0.06444033980369568, 0.21604932844638824, 0.01153593696653843, 0.0556056909263134, 0.038541585206985474, 0.005385765340179205, 0.053143277764320374, 0.08973240107297897, -0.014296055771410465, 0.006911225151270628, -0.010134434327483177, 0.07877527177333832, -0.007711304817348719, 0.03963369503617287, -0.004980319179594517, -0.046387601643800735, -0.000747041660360992, -0.012173408642411232, -0.04263705015182495, -0.06853736191987991, 0.020339295268058777, -0.054935261607170105, -0.00017674763512331992, 0.1056654155254364, -0.005841269623488188, -0.06624152511358261, -0.05187172815203667, -0.039383240044116974, -0.007035603281110525, -0.0337020568549633, -0.04681618511676788, -0.03761112689971924, 0.011755291372537613, 0.04606498032808304, 0.05019892752170563, -0.03600015118718147, -0.040214139968156815, -0.06332769989967346, -0.04370231181383133, 0.03707178682088852, 0.0005562020232900977, -0.01841396652162075, 0.017217058688402176, -0.02178305573761463 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
If we get to the end of the function and we have not been able to find a matching document to update or return, then we raise a `404` error again. ##### Delete Route ``` python @app.delete("/students/{id}", response_description="Delete a student") async def delete_student(id: str): """ Remove a single student record from the database. """ delete_result = await student_collection.delete_one({"_id": ObjectId(id)}) if delete_result.deleted_count == 1: return Response(status_code=status.HTTP_204_NO_CONTENT) raise HTTPException(status_code=404, detail=f"Student {id} not found") ```
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.07902371138334274, -0.022844312712550163, 0.06813357025384903, 0.003139766165986657, 0.022486504167318344, -0.008440575562417507, -0.0029992079362273216, 0.05096238851547241, 0.02531137317419052, 0.0009535376448184252, 0.035373736172914505, -0.0512123741209507, 0.058998048305511475, 0.05638526380062103, -0.03562803193926811, -0.010966380126774311, -0.04575272649526596, 0.0022314987145364285, -0.03557833656668663, 0.014274058863520622, 0.0552995428442955, 0.019944753497838974, -0.003303713398054242, -0.04495828226208687, 0.008769731968641281, 0.05016150325536728, -0.03239702805876732, -0.012393287383019924, -0.07030919939279556, -0.21912844479084015, -0.01770637556910515, -0.06655287742614746, -0.026210617274045944, -0.04941925033926964, 0.027843818068504333, -0.023891841992735863, -0.01691734977066517, 0.03324383124709129, -0.0097964433953166, 0.062260936945676804, 0.029581451788544655, 0.002215924672782421, -0.029107028618454933, -0.04347335174679756, -0.04758470132946968, -0.006363886408507824, -0.0359441302716732, -0.04555805027484894, 0.0693638026714325, -0.06921596825122833, -0.04713340476155281, -0.03172373026609421, -0.004149049986153841, -0.001951731857843697, 0.0023734979331493378, 0.06301987916231155, 0.06360909342765808, 0.058737754821777344, 0.027431447058916092, 0.04326629266142845, 0.0541004054248333, 0.04398188367486, -0.16486717760562897, 0.08826176822185516, 0.04034136235713959, 0.013917811214923859, -0.026109818369150162, -0.10452082753181458, 0.04658232629299164, 0.0605975016951561, -0.04088180512189865, 0.005754273384809494, -0.006952621508389711, 0.11420588940382004, 0.026933716610074043, -0.01324773021042347, 0.011869014240801334, -0.012181644327938557, 0.03343919664621353, 0.022741928696632385, -0.03528141602873802, -0.05389432981610298, -0.033211514353752136, -0.02298637107014656, 0.006904252804815769, -0.049395617097616196, 0.006102071609348059, -0.023912597447633743, 0.0614202581346035, 0.005489872302860022, 0.0074495128355920315, 0.0042527164332568645, 0.018230989575386047, 0.043901219964027405, -0.11920317262411118, 0.005313658621162176, 0.0341777503490448, 0.04340658709406853, -0.044652216136455536, 0.2158132642507553, -0.03312249481678009, 0.06517612189054489, 0.010701875202357769, -0.015670565888285637, 0.00953112356364727, -0.05657869577407837, -0.008519242517650127, 0.0177353173494339, 0.010950817726552486, -0.008813238702714443, 0.011543079279363155, -0.04525109380483627, 0.05906238034367561, -0.02375791221857071, 0.015961477532982826, 0.06995590776205063, 0.03628455847501755, 0.03618169575929642, -0.06783237308263779, -0.016451818868517876, -0.019262081012129784, -0.012403754517436028, 0.0641787201166153, -0.03198628127574921, -0.009251786395907402, -0.008270608261227608, 0.060588330030441284, 0.10905399173498154, -0.0035628508776426315, 0.0287332646548748, 0.046438269317150116, -0.027396418154239655, -0.08412355929613113, -0.03339990973472595, -0.002762720687314868, -0.022349899634718895, 0.025644725188612938, -0.017205918207764626, 0.014219947159290314, 0.0007482850342057645, -0.0001880091440398246, -0.1436643898487091, -0.052785493433475494, -0.03879817575216293, -0.036464396864175797, 0.11301176249980927, -0.00260578328743577, 0.03989279642701149, -0.03900660201907158, -0.02202698402106762, -0.002961535006761551, 0.042837515473365784, -0.06546878814697266, -0.023937512189149857, 0.007460241671651602, 0.03746788203716278, 0.042636215686798096, 0.0405266098678112, -0.011504344642162323, 0.0023854237515479326, -0.04714871570467949, -0.028836723417043686, -0.08240813761949539, 0.05470630154013634, -0.011757622472941875, -0.07151851803064346, -0.023087095469236374, -0.024670207872986794, -0.026580017060041428, 0.0016063903458416462, 0.0032420253846794367, -0.0033466126769781113, -0.04771549627184868, 0.011639738455414772, 0.08027848601341248, 0.00926034152507782, -0.025869259610772133, 0.007151951547712088, 0.0034688953310251236, 0.031059954315423965, 0.0011643975740298629, -0.013657900504767895, -0.04835432767868042, 0.018144063651561737, 0.017495889216661453, -0.03748679906129837, -0.02505752630531788, -0.03967248275876045, 0.06251154839992523, 0.05336466059088707, -0.051461100578308105, -0.031513046473264694, 0.03829321265220642, -0.06558755040168762, -0.06473580002784729, -0.05514972284436226, -0.03390920162200928, -0.03159401938319206, 0.05161936208605766, -0.023901229724287987, 0.10220061242580414, 0.030408671125769615, -0.021809987723827362, 0.027461297810077667, -0.027743607759475708, 0.03188304975628853, -0.007099349517375231, -0.009482969529926777, 0.025777995586395264, 0.013617725111544132, -0.05968605726957321, 0.013281903229653835, 0.04589556157588959, -0.027233891189098358, 0.00148208427708596, -0.04547056555747986, 0.004180144984275103, 0.07000869512557983, 0.00809090118855238, 0.021518521010875702, 0.0016133113531395793, -0.028948448598384857, 0.010548969730734825, -0.25231850147247314, 0.03328309953212738, -0.015164966695010662, -0.0199704859405756, -0.006687404587864876, -0.03841389715671539, 0.011691167019307613, 0.011308756656944752, -0.04604899510741234, 0.07308730483055115, 0.05408559739589691, 0.02882447838783264, -0.006742444820702076, 0.006229932885617018, -0.0005357118207029998, 0.01721087656915188, 0.02769889310002327, -0.022580517455935478, -0.040431682020425797, 0.0022822271566838026, -0.006163888610899448, -0.031575776636600494, -0.0068415263667702675, -0.0931854173541069, 0.030088307335972786, -0.021151017397642136, 0.2501686215400696, 0.06311054527759552, 0.011026877909898758, -0.06097059324383736, 0.04006002098321915, 0.046026356518268585, -0.005960000213235617, -0.11374353617429733, 0.05810292437672615, 0.04272664338350296, 0.03674095869064331, -0.023754050955176353, 0.03349153697490692, -0.03439917042851448, 0.03282225877046585, 0.03362497314810753, 0.004053749609738588, -0.05486616492271423, 0.006095470394939184, 0.014838303439319134, -0.04223548248410225, 0.0006114798015914857, -0.01975972205400467, 0.07101967185735703, 0.03769794851541519, 0.030485445633530617, 0.05203506723046303, 0.023214047774672508, -0.030788859352469444, -0.01983129419386387, -0.03375549986958504, -0.009332765825092793, -0.0066083199344575405, 0.04604266211390495, -0.02132878266274929, -0.021393049508333206, 0.05975400283932686, -0.029976598918437958, 0.094384104013443, 0.012977209873497486, 0.034392546862363815, -0.03355215862393379, 0.058310408145189285, -0.052808813750743866, -0.02559000998735428, 0.09767860919237137, -0.021680278703570366, -0.004908605944365263, -0.011276005767285824, 0.02483295649290085, 0.04749816283583641, -0.03525466471910477, -0.016580495983362198, -0.03808940201997757, 0.03712630644440651, -0.05515754595398903, 0.04168645665049553, 0.012857289053499699, 0.00799100287258625, 0.020095285028219223, -0.011584429070353508, -0.010131670162081718, 0.04943480342626572, -0.03534119203686714, -0.021954281255602837, 0.0028214508201926947, -0.03474432975053787, -0.012515089474618435, 0.03973278030753136, 0.015011591836810112, -0.23963527381420135, 0.0011478898813948035, 0.0139535591006279, 0.04192836582660675, -0.04632860794663429, 0.04680908843874931, 0.07022006064653397, 0.05912640318274498, -0.028834694996476173, 0.001991427503526211, -0.0015553496778011322, 0.00028159088105894625, 0.0222490131855011, -0.034464865922927856, -0.0017130686901509762, 0.05275231599807739, 0.007283351384103298, -0.02769303508102894, 0.019903775304555893, -0.03213935345411301, 0.019052695482969284, 0.06678538769483566, 0.2213830202817917, -0.02282070182263851, 0.045187998563051224, 0.02864302508533001, -0.024145016446709633, 0.03291942551732063, 0.06826018542051315, -0.03332064673304558, -0.003500887891277671, 0.010311934165656567, 0.042626820504665375, -0.043526675552129745, 0.053885046392679214, -0.016425976529717445, -0.027561645954847336, 0.011513357982039452, 0.013568468391895294, -0.07313895225524902, -0.04204391688108444, 0.014748310670256615, -0.019012782722711563, -0.018569443374872208, 0.14716552197933197, -0.02441331557929516, -0.03756531700491905, -0.05380064249038696, -0.031517136842012405, 0.02960667386651039, -0.07426375150680542, -0.015658635646104813, -0.04551037773489952, 0.03670933097600937, 0.059551678597927094, 0.041403140872716904, -0.05243625119328499, -0.02933933399617672, -0.0771227702498436, -0.029566626995801926, 0.044418469071388245, -0.02449904754757881, -0.00212967861443758, 0.037418752908706665, -0.0067476537078619 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
raise HTTPException(status_code=404, detail=f"Student {id} not found") ``` Our final route is `delete_student`. Again, because this is acting upon a single document, we have to supply an `id` in the URL. If we find a matching document and successfully delete it, then we return an HTTP status of `204` or "No Content." In this case, we do not return a document as we've already deleted it! However, if we cannot find a student with the specified `id`, then instead we return a `404`. ## Our New FastAPI App Generator If you're excited to build something more production-ready with FastAPI, React & MongoDB, head over to the Github repository for our new FastAPI app generator and start transforming your web development experience. ## Wrapping Up
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.062126949429512024, -0.013828318566083908, 0.040117502212524414, 0.0020532135386019945, 0.02998032420873642, 0.0006066916394047439, -0.011185038834810257, 0.055585168302059174, -0.010046875104308128, 0.007376098074018955, 0.053599026054143906, -0.031491201370954514, 0.07071076333522797, 0.0747600719332695, -0.02376635931432247, -0.005953669548034668, -0.010925392620265484, 0.002756565809249878, -0.037830691784620285, 0.044424235820770264, 0.0721997544169426, -0.012608397752046585, -0.02887977845966816, -0.03927086293697357, 0.01594226434826851, 0.06781511753797531, -0.023436931893229485, -0.02305975928902626, -0.06090331822633743, -0.20360521972179413, 0.0058235893957316875, -0.06815265864133835, 0.028300436213612556, -0.05173898860812187, 0.010115386918187141, -0.009967293590307236, -0.0003953423001803458, 0.028579680249094963, -0.03215232491493225, 0.04855161905288696, 0.01660980097949505, -0.025113418698310852, -0.034623388200998306, -0.012857717461884022, -0.04013383015990257, -0.007744111120700836, -0.03974676877260208, -0.04749515280127525, 0.061867620795965195, -0.07013053447008133, -0.04218330979347229, -0.036349810659885406, 0.006635063793510199, 0.00995895266532898, 0.0033405551221221685, 0.055684324353933334, 0.030608393251895905, 0.04099452123045921, 0.026400145143270493, 0.050305962562561035, 0.014065979048609734, 0.042329203337430954, -0.1507113128900528, 0.06469826400279999, 0.05284026265144348, 0.051483333110809326, -0.02776779793202877, -0.0731295496225357, 0.06696819514036179, -0.00839133933186531, -0.06840356439352036, 0.017687996849417686, -0.0025265763979405165, 0.12782973051071167, 0.028733044862747192, -0.009498871862888336, 0.05100209638476372, -0.019956786185503006, 0.030124148353934288, 0.016465136781334877, -0.05978911370038986, -0.0626339465379715, -0.02744062803685665, -0.012040089815855026, -0.019144609570503235, -0.023738225921988487, 0.025607936084270477, -0.05905594676733017, 0.060893114656209946, 0.0005294678267091513, -0.007513890042901039, -0.0040703644044697285, 0.017819134518504143, 0.05406372994184494, -0.07152032107114792, 0.01907498575747013, -0.02422364614903927, 0.07210752367973328, -0.055248796939849854, 0.23781804740428925, -0.05489907041192055, 0.04421921819448471, 0.044504694640636444, -0.03235908970236778, 0.029332008212804794, -0.024638857692480087, 0.0018080211011692882, -0.0034773226361721754, 0.020393265411257744, -0.000420090917032212, -0.012846985831856728, -0.04612721875309944, 0.0300159715116024, -0.0191390048712492, 0.021326730027794838, 0.04533848538994789, 0.052976612001657486, 0.06379503756761551, -0.06441442668437958, -0.024156911298632622, -0.01628301665186882, -0.0001055575703503564, 0.05482211336493492, -0.029590923339128494, 0.007977401837706566, -0.043811142444610596, 0.06529263406991959, 0.10407368838787079, -0.03636908531188965, 0.04628177359700203, 0.02728797309100628, -0.009873184375464916, -0.06870148330926895, -0.011418838053941727, 0.0001945207768585533, 0.0026868977583944798, 0.03527023643255234, -0.022648341953754425, -0.028915829956531525, -0.022303570061922073, -0.03084399551153183, -0.08961540460586548, -0.04688301682472229, -0.07255611568689346, -0.04490474984049797, 0.08763907104730606, -0.003232969669625163, 0.07255231589078903, -0.033498845994472504, 0.004991639405488968, 0.001831945264711976, 0.030921155586838722, -0.07851795107126236, -0.0022398787550628185, -0.008607604540884495, 0.01495295763015747, 0.028582824394106865, 0.05457722768187523, -0.000720308453310281, 0.02228469029068947, -0.015637284144759178, -0.04226963222026825, -0.04520561173558235, 0.07024893909692764, -0.0005213363328948617, -0.0647725760936737, -0.016555065289139748, 0.014350760728120804, -0.02225625514984131, 0.01026211678981781, -0.010623893700540066, 0.030420834198594093, -0.027677711099386215, 0.030873125419020653, 0.09897294640541077, 0.03055933117866516, -0.0031929058022797108, 0.0297585166990757, 0.0004562735266517848, 0.04075513035058975, -0.008533860556781292, -0.029595226049423218, -0.04612226039171219, 0.045575760304927826, 0.018288929015398026, -0.0607941634953022, 0.023138131946325302, -0.04190060496330261, 0.02564876899123192, 0.02302098087966442, -0.06543369591236115, -0.014299564063549042, -0.03174230456352234, -0.05837440490722656, -0.043759655207395554, -0.03209861367940903, -0.018940506502985954, -0.05137829855084419, 0.040232863277196884, -0.0332290381193161, 0.12234348058700562, 0.008022370748221874, -0.045514389872550964, 0.04298222437500954, -0.031546685844659805, 0.03792688250541687, 0.025800134986639023, -0.024917416274547577, 0.026520680636167526, -0.0022454664576798677, -0.05313732475042343, 0.022660378366708755, 0.018396129831671715, -0.03204643353819847, -0.01736920140683651, -0.048499125987291336, 0.0379665344953537, 0.0818377360701561, 0.022110506892204285, 0.03730054572224617, 0.018532298505306244, -0.05401046946644783, -0.008115426637232304, -0.26407554745674133, 0.04354827105998993, -0.022730160504579544, -0.052210696041584015, -0.03144972026348114, -0.03732611611485481, 0.0116385193541646, -0.027324391528964043, 0.003112898441031575, 0.06014864891767502, 0.08163731545209885, 0.0026781363412737846, 0.015111278742551804, -0.011278434656560421, 0.0013942108489573002, 0.015493770129978657, 0.03821693733334541, -0.01857994869351387, -0.013308987952768803, -0.027962999418377876, -0.014958824031054974, -0.02036997862160206, -0.024267742410302162, -0.07914428412914276, 0.04433460906147957, -0.054748594760894775, 0.24571239948272705, 0.09765786677598953, 0.019776642322540283, -0.0664595365524292, 0.04011046886444092, 0.05668696388602257, 0.013669690117239952, -0.13265973329544067, 0.040331047028303146, 0.024668343365192413, 0.015074053779244423, -0.025768335908651352, 0.047132521867752075, -0.046060625463724136, 0.003696722211316228, 0.01174946129322052, 0.0018212141003459692, -0.07796964049339294, 0.005716932937502861, -0.03137005493044853, -0.040689729154109955, -0.022299744188785553, -0.02122545801103115, 0.0765102282166481, 0.033695489168167114, 0.020575767382979393, 0.05869351327419281, 0.05207649618387222, -0.05479281395673752, -0.012761556543409824, -0.03406175598502159, 0.01619436778128147, -0.023463912308216095, 0.036515846848487854, -0.0415302999317646, -0.03667536377906799, 0.054213378578424454, -0.05142606422305107, 0.058006443083286285, 0.009317569434642792, 0.013885652646422386, -0.007110703270882368, 0.026357561349868774, -0.056453637778759, -0.016138801351189613, 0.10402575880289078, -0.008981830440461636, 0.02891319803893566, -0.009681743569672108, -0.021920926868915558, 0.04356693476438522, -0.062081947922706604, 0.029370388016104698, -0.008342720568180084, 0.027694400399923325, -0.033410049974918365, 0.034904442727565765, -0.009041151031851768, 0.02982346899807453, 0.021441921591758728, 0.029281161725521088, -0.011722950264811516, 0.043032146990299225, -0.014451507478952408, -0.0025629145093262196, 0.04229464381933212, -0.03918442130088806, -0.0372077040374279, -0.009203395806252956, 0.009379811584949493, -0.26385101675987244, 0.006656567566096783, -0.017355144023895264, 0.012938660569489002, -0.023311030119657516, 0.04354539141058922, 0.0827299952507019, 0.02755352295935154, -0.028256749734282494, 0.009865478612482548, 0.016443436965346336, -0.011565258726477623, -0.0014076861552894115, -0.036441463977098465, -0.006264083553105593, 0.057814355939626694, -0.009977832436561584, -0.028661372140049934, 0.030226536095142365, -0.020434657111763954, 0.016772886738181114, 0.02416674792766571, 0.20721568167209625, 0.004209476988762617, 0.03901377692818642, 0.052341267466545105, 0.005430478136986494, 0.05094752460718155, 0.08489816635847092, -0.03392120450735092, 0.015948321670293808, -0.0007715417305007577, 0.06845741719007492, -0.06599277257919312, 0.015132109634578228, -0.0075049023143947124, -0.033456578850746155, -0.011313125491142273, -0.01038077101111412, -0.05550086498260498, -0.04129406809806824, 0.008785521611571312, -0.014210226014256477, -0.0305208507925272, 0.11137236654758453, -0.007763977628201246, -0.05255170539021492, -0.0641806572675705, -0.04180368036031723, 0.014034641906619072, -0.00603133300319314, -0.032410599291324615, -0.055847667157649994, 0.023433392867445946, 0.06571076065301895, 0.036218415945768356, -0.008007902652025223, -0.03605269640684128, -0.075801320374012, -0.07436441630125046, 0.021526308730244637, 0.029802771285176277, -0.008085021749138832, 0.03835686296224594, -0.0032278336584568024 ]
devcenter
https://www.mongodb.com/developer/languages/python/python-quickstart-fastapi
created
## Wrapping Up I hope you have found this introduction to FastAPI with MongoDB useful. If you would like to learn more, check out my post introducing the FARM stack (FastAPI, React and MongoDB) as well as the FastAPI documentation and this awesome list. >If you have questions, please head to our developer community website where MongoDB engineers and the MongoDB community will help you build your next big idea with MongoDB.
md
{ "tags": [ "Python", "MongoDB", "Django", "FastApi" ], "pageDescription": "Getting started with MongoDB and FastAPI", "contentType": "Quickstart" }
Getting Started with MongoDB and FastAPI
2024-05-20T17:32:23.500Z
[ -0.07101202756166458, 0.017700325697660446, -0.008951045572757721, -0.002964386250823736, 0.046981945633888245, -0.041667379438877106, 0.016372691839933395, 0.004191009793430567, -0.006941914092749357, -0.006653723306953907, 0.01128230057656765, -0.0520976297557354, 0.06283412128686905, 0.05564560368657112, -0.013533560559153557, 0.008690097369253635, -0.008493819274008274, 0.003018316812813282, -0.03983199596405029, 0.019930917769670486, 0.024254782125353813, -0.0013291011564433575, -0.05754663422703743, -0.05052032321691513, 0.011851497925817966, 0.0835934728384018, -0.013021031394600868, -0.033127300441265106, -0.03293513506650925, -0.2220117300748825, 0.0015650010900571942, -0.04613480716943741, 0.08761504292488098, -0.05849539861083031, -0.012695393525063992, -0.0009553330601193011, 0.014888226985931396, 0.07341960072517395, -0.04323537275195122, 0.049213748425245285, 0.048782944679260254, 0.013114701956510544, -0.03180059418082237, -0.0638485997915268, -0.03240853175520897, -0.039269089698791504, -0.03455294668674469, -0.0053907218389213085, 0.011960987001657486, -0.054227422922849655, -0.02314811386168003, -0.02766389399766922, -0.035554785281419754, 0.024738859385252, 0.05441231280565262, 0.038936782628297806, 0.022020166739821434, 0.053446847945451736, 0.01844692975282669, 0.022729426622390747, 0.07236144691705704, 0.05108350142836571, -0.14569658041000366, 0.09266537427902222, 0.051909275352954865, 0.055694062262773514, -0.0406961590051651, -0.00839982833713293, 0.0061125801876187325, 0.0281209759414196, -0.0669412836432457, 0.018174994736909866, 0.0002877641818486154, 0.06357429176568985, 0.007203289773315191, -0.027724938467144966, 0.02503914386034012, -0.04371151328086853, 0.040447626262903214, 0.013611716218292713, -0.028865188360214233, -0.03898007795214653, -0.04105884209275246, -0.017469998449087143, -0.041842855513095856, -0.04344134032726288, 0.019886327907443047, -0.03602871671319008, 0.029275638982653618, 0.029130075126886368, -0.008512535132467747, -0.022012803703546524, 0.00594781618565321, 0.03135285899043083, -0.05824119970202446, 0.04631493613123894, 0.017098139971494675, 0.01811956986784935, -0.03963765129446983, 0.2202470302581787, -0.0611206516623497, 0.017556538805365562, 0.025012103840708733, -0.015197645872831345, 0.004088879097253084, -0.01363310869783163, -0.012583469972014427, -0.062014516443014145, -0.0014274605782702565, -0.013807357288897038, 0.008143688552081585, -0.03466475382447243, 0.0032896941993385553, -0.061916451901197433, 0.01583595760166645, 0.014686490409076214, 0.022866694256663322, 0.03044731169939041, -0.04288938269019127, -0.009945213794708252, 0.01993420347571373, 0.06574711948633194, 0.018346846103668213, 0.004046421963721514, 0.012036249041557312, -0.040322594344615936, 0.05086354538798332, 0.06252835690975189, -0.007582409307360649, 0.08915556967258453, 0.057342927902936935, 0.017528027296066284, -0.07065286487340927, -0.02682165801525116, 0.032206155359745026, 0.021777110174298286, 0.03262315317988396, -0.002808237913995981, 0.0501626655459404, 0.02307278662919998, -0.0007473516743630171, -0.09985985606908798, -0.02556302398443222, -0.11660532653331757, -0.017783835530281067, 0.10984454303979874, -0.015315582975745201, 0.0722658783197403, -0.08584017306566238, -0.031107477843761444, -0.01385864894837141, 0.03447164222598076, -0.05322212725877762, -0.02654717117547989, -0.005108719225972891, 0.012642058543860912, 0.07181902974843979, 0.055686354637145996, -0.04027137532830238, 0.0060589499771595, -0.06064266711473465, 0.005973325576633215, -0.0172224473208189, 0.050520285964012146, 0.033113036304712296, -0.16399994492530823, -0.02307986654341221, 0.02249172329902649, -0.0012960315216332674, -0.029804116114974022, -0.01735866442322731, 0.03413962200284004, -0.034123484045267105, -0.011157582513988018, 0.11735554784536362, 0.01829558052122593, -0.04851087927818298, -0.020908789709210396, -0.0005639517330564559, 0.002649180358275771, -0.014700069092214108, -0.02029893733561039, -0.06446871906518936, 0.03645415976643562, 0.011069088242948055, -0.0691402330994606, -0.019002404063940048, -0.04486226290464401, 0.04911334067583084, 0.03508053347468376, -0.006170561537146568, -0.03226989880204201, -0.04847433418035507, 0.014107642695307732, -0.03213338926434517, -0.04193699359893799, -0.000544863345567137, -0.03142646700143814, 0.04014643281698227, -0.04961170628666878, 0.040226854383945465, 0.02414947934448719, -0.02451198734343052, 0.04592874273657799, -0.04869036749005318, 0.009281374514102936, -0.025772806257009506, -0.019047996029257774, 0.03081526793539524, -0.010813513770699501, -0.015382115729153156, 0.034067828208208084, 0.02324250526726246, 0.0006622807122766972, -0.04151017591357231, -0.0046922010369598866, 0.027549808844923973, 0.041981346905231476, 0.02581687457859516, 0.044774193316698074, 0.022927824407815933, -0.1091577485203743, -0.04465671628713608, -0.21806325018405914, 0.04184702783823013, -0.01253314595669508, 0.010297042317688465, -0.028175653889775276, -0.055322978645563126, 0.013373617082834244, -0.038197968155145645, 0.01092586386948824, 0.0627981573343277, 0.10133659094572067, -0.04314499348402023, 0.0005777407204732299, 0.028380434960126877, -0.027018925175070763, 0.053490959107875824, 0.0218119565397501, -0.009484406560659409, -0.024780305102467537, -0.004198337905108929, -0.014443007297813892, 0.005766894668340683, 0.0034707793965935707, -0.09102873504161835, 0.032210204750299454, -0.027763517573475838, 0.20674996078014374, 0.015752246603369713, -0.004945651162415743, -0.05665409564971924, 0.06791123747825623, 0.0023137349635362625, -0.03569791093468666, -0.12906263768672943, 0.014520775526762009, 0.0327841155230999, 0.0035907719284296036, 0.03298564255237579, -0.02482254058122635, -0.04259807989001274, -0.036345455795526505, 0.03424420952796936, 0.0075059812515974045, -0.09567494690418243, -0.01387757994234562, -0.04056844487786293, -0.045555662363767624, -0.03509965538978577, -0.008572609163820744, 0.03413424268364906, -0.0032169707119464874, 0.025082439184188843, 0.05501766502857208, 0.06470482796430588, -0.039604805409908295, -0.022949010133743286, -0.04888041689991951, 0.0311567559838295, -0.02534361556172371, 0.04981622472405434, -0.017989125102758408, -0.05546761676669121, 0.009555073454976082, -0.02696526050567627, 0.02958756312727928, -0.0050165290012955666, -0.043340738862752914, -0.019350701943039894, 0.023319456726312637, -0.053985949605703354, -0.008476059883832932, 0.08429211378097534, -0.0631357803940773, 0.015128406696021557, 0.05242082476615906, 0.024800263345241547, 0.02453240565955639, -0.020796461030840874, 0.005488479509949684, 0.0030470655765384436, 0.037468329071998596, -0.02289038524031639, 0.04442453756928444, 0.0088585764169693, 0.05983223393559456, 0.03417317569255829, 0.1295207291841507, -0.032401349395513535, 0.015522000379860401, -0.004453430417925119, -0.00612192926928401, 0.014263532124459743, -0.049655720591545105, -0.06492933630943298, 0.001761005725711584, 0.01316920854151249, -0.29063880443573, 0.054281946271657944, -0.0021485069300979376, -0.00638217106461525, 0.013496482744812965, 0.04278092086315155, 0.05042671784758568, -0.007426985539495945, 0.008363781496882439, 0.031634267419576645, 0.01636505126953125, 0.04815490171313286, 0.039864178746938705, 0.014817299321293831, -0.001970667392015457, 0.07068074494600296, 0.04680788516998291, -0.01828610897064209, 0.04685880243778229, -0.033588092774152756, 0.023581016808748245, 0.026304543018341064, 0.23162533342838287, 0.043225985020399094, 0.025232382118701935, 0.07158058881759644, 0.023460615426301956, 0.010281107388436794, 0.0492621548473835, 0.02068798802793026, -0.00924205407500267, -0.0006044814945198596, 0.05841091647744179, -0.029074473306536674, 0.02899939753115177, 0.06364051252603531, -0.03881639614701271, 0.04945005476474762, 0.0030519268475472927, -0.04290170595049858, -0.01936744712293148, 0.03399486467242241, -0.008205238729715347, 0.014782367274165154, 0.08424826711416245, -0.04689563810825348, -0.06244727969169617, -0.09962961822748184, 0.006292691454291344, 0.027625322341918945, -0.047300148755311966, -0.08684862405061722, -0.03852420300245285, -0.035502299666404724, 0.03755095973610878, 0.0026239510625600815, 0.011829244904220104, 0.02520841546356678, -0.03469735383987427, -0.008121942169964314, 0.05643884837627411, -0.038461655378341675, -0.020907072350382805, 0.046457238495349884, 0.04629029706120491 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
# How to Deploy MongoDB Atlas with AWS CloudFormation MongoDB Atlas is the multi-cloud developer data platform that provides an integrated suite of cloud database and data services. We help to accelerate and simplify how you build resilient and performant global applications on the cloud provider of your choice. AWS CloudFormation lets you model, provision, and manage AWS and third-party resources like MongoDB Atlas by treating infrastructure as code (IaC). CloudFormation templates are written in either JSON or YAML. While there are multiple ways to use CloudFormation to provision and manage your Atlas clusters, such as with Partner Solution Deployments or the AWS CDK, today we’re going to go over how to create your first YAML CloudFormation templates to deploy Atlas clusters with CloudFormation.
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.050000738352537155, -0.06382527947425842, 0.009798458777368069, -0.006723190192133188, 0.04475439339876175, 0.011174911633133888, -0.016620002686977386, -0.0016239485703408718, -0.03084622137248516, -0.011253193952143192, 0.004472709260880947, -0.057009682059288025, 0.02297678217291832, -0.01810758002102375, 0.027911746874451637, -0.0046512773260474205, -0.027633465826511383, -0.0060975016094744205, -0.05666293948888779, 0.005971091333776712, 0.049492232501506805, -0.023046152666211128, -0.034637201577425, -0.07351649552583694, -0.004514201544225216, 0.08302490413188934, -0.034149833023548126, -0.061255864799022675, -0.04709396883845329, -0.17704515159130096, 0.014387091621756554, -0.04406174272298813, 0.07094357907772064, -0.0362238883972168, 0.002299583749845624, -0.0022830283269286156, 0.0050461748614907265, 0.0533553771674633, -0.0372861810028553, 0.016363991424441338, 0.07507488876581192, 0.03466113656759262, -0.0009004680323414505, -0.037318430840969086, -0.024058427661657333, -0.05687292665243149, -0.016216959804296494, 0.002422813791781664, 0.01300481241196394, -0.024282395839691162, 0.010911556892096996, -0.07214527577161789, -0.029671035706996918, -0.009378330782055855, 0.0075545357540249825, 0.08034183830022812, 0.051264915615320206, 0.04797619953751564, -0.013339055702090263, 0.02071019820868969, 0.02916833758354187, 0.025248566642403603, -0.18262295424938202, 0.09700758010149002, 0.051345426589250565, 0.078480564057827, -0.03243141621351242, -0.05897241830825806, 0.03380622714757919, -0.008636543527245522, -0.04350043833255768, -0.023975159972906113, 0.0010173198534175754, 0.06640742719173431, 0.03782840073108673, -0.0005682412884198129, -0.009872670285403728, -0.027262510731816292, 0.017601855099201202, 0.0030057381372898817, -0.016936887055635452, -0.0019486169330775738, -0.04450879991054535, 0.021621014922857285, -0.005415230058133602, -0.02325102873146534, 0.006428405176848173, -0.04680993780493736, 0.02429700270295143, -0.01181701011955738, -0.011889324523508549, -0.005514879245311022, 0.0038097696378827095, 0.05787461996078491, -0.0844869464635849, -0.016225561499595642, 0.0048836031928658485, -0.0014513034839183092, 0.012788081541657448, 0.23372143507003784, -0.036328449845314026, 0.011180736124515533, 0.015230265446007252, -0.03344054892659187, 0.012960841879248619, -0.034562114626169205, -0.008825654163956642, -0.049018580466508865, -0.006495146546512842, 0.03864266723394394, -0.002343293046578765, -0.0317070335149765, -0.02036040835082531, -0.05035970360040665, 0.03032165765762329, -0.0006963465129956603, -0.010064370930194855, 0.06473758816719055, -0.042029064148664474, -0.00966248381882906, 0.012621612288057804, 0.04672769084572792, 0.08603117614984512, -0.000016977724953903817, 0.043467890471220016, -0.0374264195561409, 0.0246896930038929, 0.08723421394824982, 0.014565675519406796, 0.010135142132639885, 0.039386115968227386, 0.014873232692480087, -0.07610112428665161, -0.03839093819260597, 0.04080449044704437, 0.0022101858630776405, -0.033357538282871246, -0.01766514964401722, 0.0004176285001449287, 0.048020679503679276, -0.043098945170640945, -0.04847409203648567, -0.041068609803915024, -0.06686971336603165, -0.0354858860373497, 0.16418522596359253, -0.06462327390909195, 0.05168229341506958, -0.07198504358530045, -0.03490212932229042, 0.01133564580231905, 0.03127552941441536, -0.01684669591486454, -0.0011081392876803875, 0.015128377825021744, 0.01849394105374813, 0.030942941084504128, 0.060436710715293884, -0.040334537625312805, -0.02023538388311863, -0.024685053154826164, -0.03222261369228363, -0.05603291094303131, 0.1328262984752655, -0.020753934979438782, -0.1444474458694458, -0.006745093036442995, 0.036066245287656784, 0.04507965222001076, -0.027689307928085327, -0.011892111040651798, 0.04601266607642174, 0.009637264534831047, 0.012788762338459492, 0.08581249415874481, 0.0023853671737015247, -0.05251700431108475, -0.0017417336348444223, 0.031861819326877594, 0.0060282014310359955, 0.04093683883547783, -0.03858552873134613, -0.007931378670036793, 0.03545880317687988, 0.006693557370454073, -0.05050387978553772, -0.01497171726077795, -0.031576838344335556, 0.031094616279006004, 0.002872886834666133, -0.043364688754081726, 0.05624241754412651, 0.010641776025295258, -0.0374058298766613, -0.027364784851670265, -0.039979204535484314, -0.008043940179049969, -0.02311735600233078, 0.04150709509849548, -0.0431133508682251, 0.06435960531234741, 0.05691336467862129, -0.006946069188416004, 0.061740994453430176, 0.026073124259710312, 0.012476473115384579, -0.03138244152069092, 0.00658846739679575, 0.0007482540095224977, -0.013017652556300163, -0.017070798203349113, 0.02288222685456276, 0.04108106717467308, 0.00878286175429821, -0.011158439330756664, 0.053572747856378555, 0.02098596841096878, 0.07706057280302048, -0.02356702648103237, 0.01584411971271038, 0.03732960671186447, -0.10857515037059784, -0.04574176296591759, -0.2220245897769928, 0.02326335571706295, -0.01823773980140686, 0.011623811908066273, 0.013020699843764305, -0.05479336157441139, 0.030845344066619873, 0.0015889331698417664, -0.03528619185090065, 0.07202211767435074, 0.06908903270959854, -0.012551221065223217, 0.028420845046639442, -0.0007011023117229342, -0.04918254539370537, 0.05817864090204239, 0.010808856226503849, -0.002336018718779087, -0.013771469704806805, -0.005835141055285931, 0.057315465062856674, -0.01948486641049385, -0.028663722798228264, -0.11722075939178467, 0.05746715888381004, 0.01826193556189537, 0.2339354008436203, 0.010610458441078663, 0.031976841390132904, -0.05744940787553787, 0.05892764776945114, -0.0020807653199881315, -0.007064360659569502, -0.1289721131324768, 0.051428183913230896, 0.016798555850982666, 0.03415175527334213, -0.04484504088759422, -0.025021353736519814, -0.027263358235359192, -0.043995101004838943, 0.039574671536684036, 0.018410980701446533, -0.09871412068605423, 0.016774805262684822, -0.006900037173181772, -0.04635400325059891, 0.015507640317082405, -0.05026600882411003, 0.011495884507894516, -0.01987389288842678, 0.018108436837792397, 0.024214811623096466, 0.023245053365826607, -0.02060162089765072, -0.02575317956507206, -0.1059938594698906, -0.0034006566274911165, -0.046272363513708115, 0.0280869510024786, 0.004392536822706461, -0.03973023220896721, 0.02469019405543804, -0.024012617766857147, 0.05719755217432976, -0.04009658470749855, -0.027288565412163734, 0.011279755271971226, 0.03329027071595192, -0.08341704308986664, -0.008368350565433502, 0.06922998279333115, -0.028060246258974075, 0.0015117868315428495, 0.05144616216421127, 0.0024057170376181602, 0.03668919578194618, -0.019907861948013306, -0.026110120117664337, -0.02656332030892372, 0.007580431643873453, -0.005128591321408749, 0.0435769148170948, 0.040459007024765015, 0.039536479860544205, 0.043601613491773605, -0.008211311884224415, 0.015456787310540676, 0.01609380915760994, -0.022602390497922897, 0.007421765476465225, -0.020572461187839508, -0.033131059259176254, -0.06634107977151871, 0.03765458986163139, -0.007034748792648315, -0.2919889986515045, 0.056128934025764465, -0.0053792051039636135, 0.034043848514556885, -0.005314609035849571, 0.0038304051849991083, 0.017851175740361214, 0.045766402035951614, -0.03876326233148575, 0.010679837316274643, 0.020722638815641403, 0.03496115654706955, 0.002283627400174737, 0.009260098449885845, 0.010340382345020771, 0.07158675044775009, 0.06544540077447891, -0.07960089296102524, 0.04495032876729965, -0.017356229946017265, 0.04718110337853432, 0.028695721179246902, 0.2266712337732315, 0.03105490282177925, 0.03385714441537857, 0.07049822807312012, 0.007520138751715422, 0.05511171370744705, 0.05755691975355148, 0.029740842059254646, -0.01014486514031887, 0.012124435044825077, 0.09168444573879242, -0.02143855020403862, 0.005809810943901539, 0.048706356436014175, -0.04225291311740875, 0.05240807309746742, 0.029706532135605812, -0.010465000756084919, -0.036192476749420166, 0.01771198771893978, -0.0008646963979117572, 0.024944759905338287, 0.0763852447271347, -0.04238579049706459, -0.03571469709277153, -0.0919213742017746, 0.02203240431845188, 0.0035672804806381464, -0.04019380733370781, -0.02405974268913269, -0.03661065921187401, -0.02090405859053135, 0.028432514518499374, 0.035534895956516266, -0.0004093978204764426, -0.01489611528813839, -0.035159315913915634, -0.036275189369916916, 0.03142678737640381, -0.08822968602180481, -0.01918770931661129, 0.037306640297174454, -0.014723544009029865 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
These pre-made templates directly leverage MongoDB Atlas resources from the CloudFormation Public Registry and execute via the AWS CLI/AWS Management Console. Using these is best for users who seek to be tightly integrated into AWS with fine-grained access controls. Let’s get started! *Prerequisites:* - Install and configure an AWS Account and the AWS CLI. - Install and configure the MongoDB Atlas CLI (optional but recommended). ## Step 1: Create a MongoDB Atlas account Sign up for a free MongoDB Atlas account, verify your email address, and log into your new account. Already have an AWS account? Atlas supports paying for usage via the AWS Marketplace (AWS MP) without any upfront commitment — simply sign up for MongoDB Atlas via AWS Marketplace. and contact AWS support directly, who can help confirm the CIDR range to be used in your Atlas PAK IP Whitelist. on MongoDB Atlas.
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.04774578660726547, -0.05048114061355591, -0.0001565893180668354, 0.009149537421762943, 0.00004828570308745839, 0.008926029317080975, 0.0212631206959486, -0.0011259728344157338, 0.0017904330743476748, -0.015232358127832413, 0.018078532069921494, -0.05467306077480316, 0.036294467747211456, -0.016227124258875847, 0.01826229691505432, -0.0022802595049142838, -0.016697127372026443, 0.03908871114253998, -0.03555237874388695, 0.019349247217178345, 0.006304389331489801, -0.022674668580293655, -0.030334597453475, -0.06655508279800415, -0.028730599209666252, 0.07058463990688324, -0.03914898261427879, -0.060417283326387405, -0.05205994471907616, -0.2091027945280075, 0.003407029900699854, -0.06977476924657822, 0.05633420869708061, -0.031151168048381805, -0.01667529158294201, -0.03125791251659393, -0.02888069860637188, 0.04870808124542236, -0.023554570972919464, -0.012010338716208935, 0.07084405422210693, 0.028242025524377823, -0.01276481058448553, -0.02860000729560852, -0.051066841930150986, -0.0779876634478569, -0.0019007017835974693, 0.03005695715546608, 0.054957982152700424, -0.02478562295436859, 0.001495754113420844, -0.06538373231887817, 0.01627451553940773, -0.028465716168284416, 0.02336578071117401, 0.058176346123218536, 0.03923288732767105, 0.03714466094970703, 0.014155223034322262, -0.010494369082152843, 0.00995482038706541, 0.037226639688014984, -0.20299039781093597, 0.10101857036352158, 0.02861638367176056, 0.08784925192594528, -0.032021414488554, -0.0018971478566527367, 0.023378225043416023, -0.009456776082515717, -0.06653611361980438, -0.0025040560867637396, 0.00007998420915100724, 0.055491264909505844, 0.02617008611559868, -0.001877632807008922, -0.0254635252058506, -0.02365315519273281, 0.01522386260330677, -0.0012855192180722952, -0.032217904925346375, 0.030474605038762093, -0.02182975597679615, 0.027444951236248016, 0.012033198960125446, 0.0043839649297297, 0.01228526420891285, -0.02393779344856739, 0.032719552516937256, -0.004361430183053017, -0.01804136112332344, -0.02561131678521633, 0.020197998732328415, 0.027091672644019127, -0.07397343963384628, -0.0007620744872838259, 0.03545406088232994, 0.015190628357231617, -0.029963918030261993, 0.2209606170654297, -0.053074706345796585, 0.027704624459147453, -0.0033959283027797937, -0.016565999016165733, 0.02809499204158783, -0.014595381915569305, -0.025256222113966942, -0.034497976303100586, -0.004065732937306166, 0.016385849565267563, 0.005408062599599361, -0.03788710758090019, 0.010477065108716488, -0.06122337654232979, 0.040700167417526245, 0.03346508741378784, -0.026480499655008316, 0.07018990814685822, -0.016712121665477753, 0.011021547019481659, -0.018233979120850563, 0.02081640064716339, 0.0662539079785347, 0.004509730264544487, 0.050104495137929916, -0.017521657049655914, 0.02949588932096958, 0.08697676658630371, 0.0035633977968245745, 0.05249357596039772, 0.02730405144393444, -0.004898367915302515, -0.06656160205602646, -0.012254024855792522, 0.02527715265750885, 0.009695732034742832, -0.02358168549835682, 0.009360493160784245, 0.034073419868946075, 0.03682762384414673, -0.043849170207977295, -0.048813596367836, -0.01098103541880846, -0.07336213439702988, 0.001923288102261722, 0.13699378073215485, -0.060380127280950546, 0.07170597463846207, -0.06025896221399307, -0.05821404606103897, 0.014376879669725895, 0.028685810044407845, -0.06741244345903397, -0.003980635665357113, -0.0005277758464217186, -0.006440215278416872, 0.05820922181010246, 0.0842290073633194, -0.0284682959318161, 0.008625083602964878, -0.049735818058252335, -0.04698466137051582, -0.03149208799004555, 0.11412008106708527, -0.004543107468634844, -0.14017251133918762, -0.003668050980195403, 0.021468499675393105, 0.023461082950234413, -0.02044655941426754, -0.019401300698518753, 0.03472902998328209, 0.0008025693241506815, 0.01354176178574562, 0.1039753407239914, -0.003794558346271515, -0.06233471632003784, 0.018664874136447906, 0.024762162938714027, 0.007495410740375519, -0.0015546224312856793, -0.05033493414521217, -0.04197106882929802, 0.02899836003780365, -0.005118425935506821, -0.0625179186463356, -0.03413207456469536, -0.01388462446630001, 0.04364822432398796, -0.017181724309921265, -0.03057519532740116, 0.06824935227632523, -0.027079176157712936, -0.025126421824097633, -0.011449608020484447, -0.049704961478710175, -0.038262348622083664, -0.011857246048748493, 0.04702848941087723, -0.04014042392373085, 0.0812164694070816, 0.06336747109889984, -0.03283295780420303, 0.05507135018706322, -0.022418102249503136, 0.016269056126475334, -0.016556372866034508, -0.008789288811385632, 0.04340903460979462, -0.021108917891979218, -0.023529378697276115, 0.038412854075431824, 0.022409262135624886, 0.0014657967258244753, -0.030393820255994797, 0.021376578137278557, 0.023018382489681244, 0.05252143740653992, 0.0007836228469386697, 0.023456215858459473, 0.015415433794260025, -0.07433059066534042, -0.047070275992155075, -0.23942752182483673, 0.04667416587471962, 0.009327517822384834, 0.009656284004449844, -0.019691240042448044, -0.07013765722513199, 0.0378444567322731, 0.006868021562695503, -0.03281110152602196, 0.06760402768850327, 0.09000329673290253, -0.029048841446638107, 0.014945553615689278, 0.026140719652175903, -0.03223935142159462, 0.08481767028570175, 0.01527791190892458, 0.004031010437756777, -0.013134806416928768, 0.009997664019465446, 0.037419889122247696, -0.026111580431461334, -0.019146103411912918, -0.056116797029972076, 0.06309401243925095, 0.020271610468626022, 0.250732421875, 0.012669634073972702, 0.039601072669029236, -0.03548646718263626, 0.0647185668349266, -0.009730719961225986, -0.01145990565419197, -0.12841936945915222, 0.040337469428777695, 0.020256949588656425, 0.01042705588042736, -0.022140922024846077, 0.000003090166956098983, -0.03609497472643852, -0.04020339250564575, 0.04707145690917969, 0.02456720545887947, -0.08650944381952286, -0.003717427607625723, -0.0038165280129760504, -0.028527935966849327, 0.02868148311972618, -0.05861077830195427, 0.0008841881062835455, -0.025399774312973022, 0.0533614344894886, 0.014114693738520145, 0.016544610261917114, -0.03645791858434677, -0.0546276830136776, -0.08058741688728333, 0.002154955407604575, -0.0420621857047081, 0.05571398138999939, 0.0037745069712400436, -0.03305096924304962, 0.025359343737363815, -0.06503019481897354, 0.014661738649010658, -0.04008512198925018, -0.03176466003060341, 0.01500239409506321, 0.04895070567727089, -0.06144490838050842, -0.009985316544771194, 0.06670299917459488, -0.011458063498139381, 0.041241951286792755, 0.04476027935743332, 0.005499410443007946, 0.01825881376862526, -0.02776890993118286, -0.002504546893760562, -0.0430324412882328, 0.020628726109862328, -0.0038425340317189693, 0.036554835736751556, 0.01461084745824337, 0.03987537696957588, 0.05384136736392975, 0.03330042213201523, -0.006831434089690447, -0.013229415751993656, -0.031407680362463, -0.008519862778484821, -0.004795295186340809, -0.0338740311563015, -0.021836863830685616, 0.0565737821161747, 0.0024054287932813168, -0.30022650957107544, 0.03687362000346184, -0.007848277688026428, 0.0250870194286108, -0.005913726985454559, 0.01301928423345089, 0.04521700739860535, 0.02194814942777157, -0.05526699125766754, -0.0015755943022668362, 0.04853561148047447, 0.06159920617938042, 0.004108508117496967, -0.0004847710079047829, 0.020267732441425323, 0.061191435903310776, 0.04829379543662071, -0.04761650413274765, 0.01670340821146965, -0.050531141459941864, 0.03561440110206604, -0.023151274770498276, 0.23332162201404572, 0.057267095893621445, 0.005047295242547989, 0.06177803874015808, 0.02799631468951702, 0.0518079474568367, 0.03710923343896866, 0.02479488030076027, 0.024616826325654984, -0.02095748670399189, 0.07284397631883621, -0.019638216122984886, 0.04468196630477905, 0.060760483145713806, -0.027068831026554108, 0.0432332381606102, 0.04163379594683647, -0.015402043238282204, -0.05747104808688164, 0.008718101307749748, -0.04684729129076004, 0.023398621007800102, 0.048364073038101196, -0.07686153799295425, -0.032296426594257355, -0.06737607717514038, -0.006299762055277824, 0.03805461898446083, -0.047640156000852585, -0.032017506659030914, -0.018354520201683044, 0.00787909422069788, -0.003688405966386199, 0.0517641119658947, -0.031093189492821693, -0.03011908195912838, -0.049880724400281906, -0.03497019037604332, 0.019904164597392082, -0.06538407504558563, 0.003409004770219326, 0.02858562022447586, -0.015841979533433914 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
on MongoDB Atlas. ). You can set this up with AWS IAM (Identity and Access Management). You can find that in the navigation bar of your AWS. You can find the ARN in the user information in the “Roles” button. Once there, find the role whose ARN you want to use and add it to the Extension Details in CloudFormation. Learn how to create user roles/permissions in the IAM. required from our GitHub repo. It’s important that you use an ARN with sufficient permissions each time it’s asked for. . ## Step 7: Deploy the CloudFormation template In the AWS management console, go to the CloudFormation tab. Then, in the left-hand navigation, click on “Stacks.” In the window that appears, hit the “Create Stack” drop-down. Select “Create new stack with existing resources.”
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.0755174532532692, -0.045746151357889175, -0.0031569437123835087, -0.02912253886461258, 0.023407185450196266, 0.051419876515865326, 0.03531038761138916, 0.011811909265816212, -0.01864015869796276, 0.006131401751190424, -0.006962109822779894, -0.06877235323190689, 0.028606876730918884, -0.015463192015886307, 0.07609696686267853, 0.02283201925456524, -0.0444873608648777, 0.029608599841594696, -0.06776994466781616, 0.03797756880521774, 0.05874042212963104, -0.02720457874238491, -0.02691582776606083, -0.05821618810296059, 0.002665482694283128, 0.0858975350856781, -0.030050665140151978, -0.03357778117060661, -0.038319118320941925, -0.1821279078722, -0.013823797926306725, -0.03857750445604324, 0.07671430706977844, -0.008251866325736046, -0.022563224658370018, -0.03400716930627823, -0.0017078171949833632, 0.066412054002285, -0.03663913533091545, 0.02439114637672901, 0.06408829987049103, 0.022022876888513565, 0.0018642711220309138, -0.048597387969493866, -0.008264546282589436, -0.050470441579818726, 0.026875149458646774, -0.028130076825618744, 0.03313082456588745, -0.037633027881383896, 0.03796016797423363, -0.03463103622198105, -0.01292373239994049, 0.02191784419119358, 0.031049080193042755, 0.06917204707860947, 0.049478285014629364, 0.02992287464439869, 0.008868456818163395, 0.0128710325807333, 0.04270811006426811, 0.02850283496081829, -0.20067009329795837, 0.112002894282341, 0.004505205899477005, 0.08730442821979523, -0.03519074618816376, -0.042524829506874084, 0.03061753511428833, -0.024336664006114006, -0.056976184248924255, -0.028745874762535095, -0.01912366971373558, 0.07162763178348541, 0.01190250739455223, 0.012705386616289616, -0.012820973992347717, -0.04178992658853531, 0.04370211809873581, -0.010785791091620922, -0.06755051761865616, -0.004795979242771864, -0.03881007060408592, 0.03144153207540512, 0.018550720065832138, -0.045065734535455704, 0.047753073275089264, -0.06341008096933365, 0.030980857089161873, 0.033643584698438644, -0.015710657462477684, -0.0271986685693264, 0.020047178491950035, 0.048857659101486206, -0.07910557836294174, -0.010900850407779217, 0.027502916753292084, 0.02638162672519684, -0.04430001229047775, 0.23707708716392517, -0.04661639407277107, -0.02028951235115528, -0.016928989440202713, 0.019068643450737, 0.006659537088125944, 0.011860761791467667, -0.007341200485825539, -0.03273956850171089, -0.005766618996858597, 0.029667505994439125, 0.012987548485398293, -0.008370738476514816, -0.021399695426225662, -0.05875749513506889, 0.04066202789545059, 0.038934700191020966, -0.034409299492836, 0.02213915064930916, -0.03662746027112007, -0.018128950148820877, 0.008359663188457489, 0.008578748442232609, 0.04230165109038353, 0.03578358143568039, 0.03677970543503761, -0.024366222321987152, 0.05041152238845825, 0.09257698059082031, 0.03440772742033005, 0.044519320130348206, 0.05955842509865761, -0.007904146797955036, -0.07660221308469772, -0.051118846982717514, 0.04462755471467972, 0.026853682473301888, -0.028776321560144424, -0.03652165085077286, 0.006814603228121996, 0.030711693689227104, -0.031271692365407944, -0.05780142918229103, -0.026894759386777878, -0.05968065187335014, -0.0014418911887332797, 0.16455517709255219, -0.04311901330947876, 0.05910197272896767, -0.07242293655872345, -0.052243921905756, -0.017087066546082497, 0.017601078376173973, -0.04187185689806938, -0.036494363099336624, 0.005939862225204706, 0.022481780499219894, 0.043661244213581085, 0.05842094495892525, -0.04480850696563721, 0.0002506996679585427, -0.021942138671875, -0.031978100538253784, -0.028186680749058723, 0.09769842028617859, -0.010263058356940746, -0.09905935823917389, -0.012117297388613224, 0.04265705868601799, 0.016406012699007988, -0.0015113662229850888, 0.008302695117890835, 0.00284382002428174, -0.013694138266146183, 0.039236314594745636, 0.08025529980659485, 0.021174192428588867, -0.04690849781036377, 0.006358926650136709, -0.01665763184428215, -0.004486197605729103, 0.021326076239347458, -0.044905051589012146, -0.02724876068532467, 0.009864212945103645, -0.002492001745849848, -0.04678570479154587, 0.006991885136812925, -0.04031706601381302, 0.015126748941838741, 0.011592205613851547, -0.051133111119270325, 0.0991283655166626, -0.013640545308589935, -0.03199053183197975, -0.012484674341976643, -0.08185259252786636, 0.002219459041953087, -0.012537539936602116, 0.015735888853669167, -0.057840801775455475, 0.0788390040397644, 0.04602935165166855, -0.039995528757572174, 0.01951509341597557, -0.022911008447408676, 0.036588117480278015, -0.022913577035069466, 0.003299175063148141, 0.060606569051742554, -0.016509614884853363, -0.023134469985961914, 0.05664416402578354, 0.029080858454108238, -0.010256917215883732, -0.06384223699569702, 0.03395798057317734, 0.03747803717851639, 0.022150792181491852, 0.009027201682329178, 0.01211210060864687, 0.028338855132460594, -0.06194382533431053, -0.03617691993713379, -0.23937757313251495, 0.029677044600248337, 0.0024930976796895266, -0.00514815142378211, -0.012782898731529713, -0.028767967596650124, 0.021604284644126892, 0.003505904460325837, -0.014869947917759418, 0.05751422420144081, 0.07858183234930038, -0.021160287782549858, 0.0012341445544734597, 0.034535981714725494, -0.02658642828464508, 0.0573919340968132, -0.00843776948750019, -0.012201628647744656, 0.010549766942858696, -0.021158788353204727, 0.004684094805270433, 0.01587001234292984, 0.008967628702521324, -0.07799399644136429, 0.06417999416589737, 0.0151519775390625, 0.23168674111366272, -0.01162596233189106, 0.041072435677051544, -0.028500892221927643, 0.034420445561409, -0.007519362960010767, -0.05495501682162285, -0.1282479166984558, 0.01626741886138916, 0.02645903453230858, -0.0063820332288742065, -0.033537816256284714, 0.010745949111878872, -0.05799674242734909, -0.017410822212696075, 0.025894487276673317, 0.01094149611890316, -0.0891340896487236, 0.011446173302829266, -0.02455996535718441, -0.03406418487429619, 0.010955586098134518, -0.06177915632724762, -0.006913821212947369, 0.02266247756779194, 0.029446033760905266, 0.019100738689303398, 0.0162339024245739, -0.06474562734365463, -0.04164833948016167, -0.06603109836578369, -0.020372137427330017, 0.0004875812737736851, 0.07506778091192245, -0.012753162533044815, -0.024184664711356163, 0.004824279807507992, -0.038741335272789, 0.023611949756741524, -0.03399166837334633, -0.07306773960590363, -0.0056874314323067665, 0.03245484083890915, -0.07768134027719498, -0.006396959535777569, 0.042611345648765564, -0.0032519050873816013, 0.05310053005814552, 0.03599173203110695, -0.005839120130985975, 0.022160498425364494, -0.03860887512564659, -0.05111640691757202, -0.03394691273570061, 0.015686476603150368, -0.06515012681484222, 0.03575560078024864, 0.012403353117406368, -0.006666719913482666, 0.05736676603555679, -0.005628824234008789, 0.04031853377819061, 0.038324449211359024, -0.029609812423586845, -0.028513727709650993, -0.007709921337664127, -0.033242326229810715, -0.05773887038230896, 0.054143283516168594, -0.007306505925953388, -0.277426153421402, 0.07942036539316177, -0.007123538758605719, 0.03487546369433403, 0.0057808468118309975, 0.028098182752728462, 0.026927366852760315, 0.019050518050789833, -0.048460617661476135, 0.00824596919119358, 0.03714217245578766, 0.008695587515830994, -0.004015037324279547, 0.018919391557574272, 0.00009172883437713608, 0.08746050298213959, 0.03154102340340614, -0.033492568880319595, 0.05029021203517914, -0.05358642339706421, 0.0419907309114933, 0.032615069299936295, 0.24707023799419403, 0.02901487797498703, 0.025991827249526978, 0.0869903489947319, 0.0348920039832592, 0.008265328593552113, 0.030100977048277855, 0.03515215218067169, 0.019488226622343063, 0.009321199730038643, 0.08366581052541733, -0.03111376240849495, 0.028919905424118042, 0.025133876129984856, 0.004181081894785166, 0.05574800819158554, 0.02290574088692665, -0.018773501738905907, -0.04605419933795929, -0.019087763503193855, -0.05721457675099373, 0.004927845671772957, 0.08402001857757568, -0.06603404879570007, -0.0375518798828125, -0.07275915145874023, 0.020792322233319283, 0.014806278981268406, -0.04943092539906502, 0.010760688222944736, -0.020906485617160797, 0.01522752083837986, 0.03851093351840973, 0.03025936149060726, -0.020988093689084053, 0.007519733626395464, -0.03635237738490105, -0.04047495126724243, 0.019712762907147408, -0.05689461529254913, 0.007415024563670158, -0.008230172097682953, 0.021035578101873398 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
Next, select “template is ready” in the “Prerequisites” section and “Upload a template” in the “Specify templates” section. From here, you will choose the YAML (or JSON) file containing the MongoDB Atlas deployment that you created in the prior step. . The fastest way to get started is to create a MongoDB Atlas account from the AWS Marketplace. Additionally, you can watch our demo to learn about the other ways to get started with MongoDB Atlas and CloudFormation Go build with MongoDB Atlas and AWS CloudFormation today!
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.05122458562254906, -0.02530042827129364, 0.007350148633122444, -0.010524928569793701, 0.027842823415994644, 0.021863631904125214, -0.04583825543522835, 0.003944881726056337, -0.02962489239871502, -0.018052484840154648, 0.0024154798593372107, -0.05337638035416603, 0.026192255318164825, -0.01870087906718254, 0.019875187426805496, 0.02512369491159916, -0.017979558557271957, 0.011393222957849503, -0.05092529207468033, 0.016520041972398758, 0.03328343480825424, -0.01857166737318039, -0.03396351635456085, -0.07202698290348053, 0.014031659811735153, 0.0576518177986145, -0.02763153426349163, -0.04721501097083092, -0.0235873032361269, -0.19283591210842133, 0.02393367327749729, -0.08309779316186905, 0.05747980624437332, -0.039307743310928345, -0.004781866911798716, 0.0032338290475308895, -0.019725371152162552, 0.06753547489643097, -0.03334764391183853, 0.01718916743993759, 0.06444304436445236, 0.04681174457073212, -0.02263561822474003, -0.0440567210316658, -0.023456737399101257, -0.055763352662324905, 0.011275473050773144, 0.02362830750644207, 0.06152813136577606, -0.04135690629482269, 0.013071979396045208, -0.05760405585169792, -0.02522950805723667, -0.03862220048904419, 0.010056333616375923, 0.06859292834997177, 0.06608964502811432, 0.04044116288423538, -0.03220424801111221, 0.02253018692135811, -0.004479583818465471, 0.03130599483847618, -0.2184244990348816, 0.10973598062992096, 0.0056976256892085075, 0.07194449752569199, -0.032093968242406845, -0.02543697878718376, 0.008493779227137566, 0.011073942296206951, -0.05432400852441788, 0.0027245127130299807, -0.007992416620254517, 0.0802021250128746, 0.04010801389813423, -0.02663993649184704, -0.01569000817835331, -0.03560645878314972, 0.03212800994515419, 0.011872011236846447, -0.03304680809378624, 0.03437606245279312, -0.01776891015470028, 0.042435627430677414, -0.009741702117025852, -0.00640910305082798, 0.03052467107772827, -0.016019849106669426, 0.025463083758950233, 0.012398328632116318, 0.000332600437104702, -0.01734057255089283, 0.00476227980107069, 0.03634973615407944, -0.08186127990484238, -0.012932056561112404, 0.011615880765020847, 0.000495782180223614, -0.0023902584798634052, 0.20488452911376953, -0.05263747647404671, 0.029863201081752777, 0.028648070991039276, 0.0007793930126354098, 0.017661096528172493, -0.03621639683842659, -0.02043984830379486, -0.04909902438521385, 0.00802112091332674, 0.01689959689974785, -0.001118999207392335, -0.03413072228431702, -0.022757092490792274, -0.07027560472488403, 0.022981785237789154, 0.012412182986736298, -0.024552319198846817, 0.05213722586631775, -0.03954163193702698, -0.007405234966427088, 0.033733949065208435, 0.0289121363312006, 0.07015788555145264, -0.021089253947138786, 0.009795252233743668, -0.033283669501543045, 0.019155066460371017, 0.0841607004404068, 0.028640560805797577, 0.03522511199116707, 0.02844475768506527, 0.017417581751942635, -0.07556368410587311, -0.04026574268937111, 0.02909761294722557, 0.0132605517283082, -0.008412712253630161, -0.009704210795462132, 0.005036619491875172, 0.03100847639143467, -0.023525487631559372, -0.04325278475880623, -0.04844782128930092, -0.09158188104629517, -0.010000986978411674, 0.12464589625597, -0.07548448443412781, 0.06496182829141617, -0.05226525664329529, -0.05386453866958618, -0.0015577340964227915, 0.028200345113873482, -0.03813105821609497, -0.001713167643174529, -0.015071798115968704, 0.013156136497855186, 0.025817567482590675, 0.07268809527158737, -0.032528385519981384, -0.007680470589548349, -0.06573706120252609, -0.05056838318705559, -0.04058115556836128, 0.09238971769809723, 0.0005893871420994401, -0.11956468969583511, -0.0018070481019094586, 0.028157269582152367, 0.06324531883001328, -0.010139930993318558, -0.010333199985325336, 0.04805723577737808, 0.006752397399395704, 0.03583395853638649, 0.11514885723590851, 0.015703674405813217, -0.029086362570524216, 0.01357523538172245, 0.03240969404578209, -0.0007673619547858834, 0.032190218567848206, -0.05045851692557335, -0.039277829229831696, 0.020315444096922874, -0.006098933517932892, -0.0583268366754055, -0.007868261076509953, -0.04072277992963791, 0.01727929711341858, -0.0003978448221459985, -0.03914663940668106, 0.0542939268052578, 0.004951790906488895, -0.022835388779640198, -0.028011541813611984, -0.04362611472606659, -0.031163034960627556, -0.025239456444978714, 0.06264612078666687, -0.05763867869973183, 0.07607237249612808, 0.04312492161989212, -0.012733051553368568, 0.0655875876545906, -0.005266289692372084, 0.0002077090903185308, 0.0024091284722089767, -0.01875242404639721, 0.0444292277097702, -0.005290803033858538, -0.02948227897286415, 0.03495289757847786, 0.04521249234676361, 0.008042999543249607, -0.0308540016412735, 0.05460348725318909, 0.0008689042297191918, 0.05794573947787285, -0.00737011106684804, 0.038597531616687775, 0.011393156833946705, -0.10882478952407837, -0.03132050856947899, -0.24099820852279663, 0.045104239135980606, -0.021815314888954163, 0.02772265486419201, -0.018741389736533165, -0.060286834836006165, 0.052068378776311874, 0.0042443061247467995, -0.018938135355710983, 0.06729128211736679, 0.09928460419178009, -0.034443750977516174, 0.026170877739787102, -0.014907753095030785, -0.03642542287707329, 0.07013410329818726, 0.005200739484280348, -0.012142635881900787, 0.016946488991379738, 0.0017084648134186864, 0.029802003875374794, -0.025643717497587204, -0.030262943357229233, -0.10322006046772003, 0.061594538390636444, -0.0002317829494131729, 0.23491404950618744, 0.010349515825510025, 0.029597561806440353, -0.0603872612118721, 0.05804123729467392, 0.008648311719298363, -0.02055203542113304, -0.14015863835811615, 0.051653485745191574, 0.02900402620434761, 0.021604271605610847, -0.02008768543601036, 0.012898195534944534, -0.03968540206551552, -0.03264664113521576, 0.06299958378076553, 0.02170373685657978, -0.09703266620635986, 0.011265122331678867, -0.01669444888830185, -0.06684958934783936, 0.042437341064214706, -0.026350317522883415, 0.00017247135110665113, -0.005713724065572023, 0.023874886333942413, 0.036923911422491074, 0.016833961009979248, -0.04136097803711891, -0.05834297463297844, -0.09503845125436783, 0.003973678685724735, -0.04232001677155495, 0.027949994429945946, 0.027031607925891876, -0.03280076012015343, 0.007839693687856197, -0.030235769227147102, 0.04383470118045807, -0.051898594945669174, -0.03736191242933273, -0.013305973261594772, 0.03746310621500015, -0.0779094323515892, -0.0062605938874185085, 0.04612254351377487, -0.007661741226911545, 0.028376396745443344, 0.0691789761185646, 0.005015791859477758, 0.016144409775733948, -0.028810756281018257, -0.024517575278878212, -0.04189581796526909, -0.01892680861055851, -0.02457013726234436, 0.026530837640166283, 0.015378566458821297, 0.018515923991799355, 0.04830183461308479, 0.0009336387156508863, -0.000709082349203527, -0.005072005093097687, -0.012720308266580105, 0.00434744032099843, -0.0022037022281438112, -0.03548229858279228, -0.02780850976705551, 0.042329587042331696, -0.017932936549186707, -0.274740606546402, 0.0378914512693882, 0.0345657654106617, 0.053907450288534164, -0.005319851450622082, 0.0064781117253005505, 0.059551939368247986, 0.04150298982858658, -0.035079050809144974, 0.023922016844153404, 0.03219680115580559, 0.02572770044207573, 0.0074530187994241714, 0.008813942782580853, 0.01055585965514183, 0.06725772470235825, 0.04600095376372337, -0.060473017394542694, 0.04569767788052559, -0.06292248517274857, 0.05789700895547867, 0.009169877506792545, 0.2342522293329239, 0.038538359105587006, 0.03307317942380905, 0.05133817344903946, 0.024394502863287926, 0.05276847258210182, 0.05655073747038841, 0.029666462913155556, 0.030450424179434776, 0.0062157888896763325, 0.08094669133424759, -0.008096837438642979, 0.027483904734253883, 0.04847170412540436, -0.054226912558078766, 0.041137028485536575, 0.01802678219974041, -0.010297680273652077, -0.05237966403365135, 0.0016980004729703069, -0.018943948671221733, 0.03421638533473015, 0.06269954890012741, -0.0772223174571991, -0.04073604941368103, -0.08292101323604584, -0.026052961125969887, 0.017996368929743767, -0.04912397265434265, -0.006240832153707743, -0.019942475482821465, 0.004506195429712534, 0.019934246316552162, 0.01601949892938137, 0.00887018907815218, -0.0005864714621566236, -0.05113972723484039, -0.031083865091204643, 0.021944332867860794, -0.08345676213502884, 0.01636187732219696, 0.036281004548072815, 0.0009127923403866589 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
[1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt6a7a0aace015cbb5/6504a623a8cf8bcfe63e171a/image4.png [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt471e37447cf8b1b1/6504a651ea4b5d10aa5135d6/image8.png [3]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt3545f9cbf7c8f622/6504a67ceb5afe6d504a833b/image13.png
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.03217098489403725, -0.0043207877315580845, 0.019217468798160553, -0.01546534150838852, 0.032254695892333984, 0.0203914362937212, 0.0005730482516810298, 0.028891121968626976, -0.007707154378294945, -0.034837741404771805, 0.010743200778961182, -0.09464114904403687, 0.03375709056854248, 0.010580483824014664, 0.04657500237226486, -0.0022540055215358734, 0.027774076908826828, 0.037667881697416306, -0.08465463668107986, 0.031985994428396225, 0.040292587131261826, -0.01741126738488674, 0.023918399587273598, -0.056263361126184464, 0.01020300667732954, 0.025932814925909042, -0.036373820155858994, 0.005143236834555864, -0.042826682329177856, -0.1888151466846466, 0.002572443801909685, -0.0702248364686966, 0.03203097730875015, -0.06766395270824432, 0.014666369184851646, -0.024744972586631775, -0.024174023419618607, 0.08198783546686172, -0.043158214539289474, 0.014036951586604118, 0.06463571637868881, -0.045896340161561966, -0.04217331483960152, -0.05559011921286583, -0.025899704545736313, -0.051310956478118896, -0.027844760566949844, -0.02992609329521656, 0.02716168574988842, -0.04501371458172798, 0.012977204285562038, -0.022788485512137413, -0.007097791880369186, 0.037277210503816605, 0.03572951629757881, 0.04228825122117996, 0.05015318840742111, 0.046980056911706924, 0.02416321262717247, 0.05662928521633148, 0.019531913101673126, 0.08108389377593994, -0.22446653246879578, 0.09991978853940964, 0.052420102059841156, 0.031401507556438446, -0.02313479222357273, 0.012903719209134579, 0.016279056668281555, 0.04746222496032715, -0.020313594490289688, 0.024463819339871407, 0.02900433912873268, 0.019296683371067047, 0.006072405260056257, -0.052146073430776596, -0.018913744017481804, -0.034553322941064835, -0.038995180279016495, -0.059741076081991196, -0.03574807569384575, 0.004229326732456684, -0.007596386596560478, -0.017235079780220985, 0.01032475009560585, -0.013043112121522427, -0.04241030290722847, -0.06742493063211441, 0.03728767856955528, 0.024648968130350113, -0.015339364297688007, 0.002036420162767172, 0.011892356909811497, 0.023159770295023918, -0.07543672621250153, -0.017634226009249687, 0.024854745715856552, 0.011940156109631062, 0.0019790700171142817, 0.18323080241680145, -0.07505618780851364, -0.0019865892827510834, 0.06690625101327896, -0.015206251293420792, 0.04242323711514473, -0.03230172023177147, 0.009815647266805172, -0.057134922593832016, -0.018098905682563782, 0.053035907447338104, -0.0034171720035374165, -0.0020185771863907576, 0.05469854548573494, -0.04247121885418892, 0.018988439813256264, 0.005747509654611349, 0.012166270054876804, 0.012844366952776909, -0.026865266263484955, -0.039856918156147, -0.01762888766825199, 0.01624862104654312, 0.06084798648953438, -0.010620401240885258, 0.03875577449798584, -0.03256696090102196, 0.045549239963293076, 0.08289363980293274, 0.06281984597444534, 0.03964643552899361, 0.04268312826752663, 0.0074333976954221725, -0.00034523726208135486, -0.004292454570531845, -0.039444874972105026, 0.05051006004214287, 0.007335399743169546, -0.019800633192062378, 0.01316982414573431, -0.02986113354563713, -0.028212161734700203, -0.15541625022888184, 0.006350778043270111, -0.10408270359039307, 0.01944896951317787, 0.0942404717206955, -0.01230356004089117, 0.01775188185274601, -0.09478215873241425, 0.0007796890567988157, 0.01279995497316122, 0.04158049821853638, -0.006488981656730175, 0.0006222398951649666, 0.03855862468481064, 0.00992517452687025, 0.036153100430965424, 0.08848138153553009, -0.02420942112803459, -0.030958890914916992, 0.002322474727407098, -0.07045991718769073, -0.04000416025519371, 0.09430430829524994, 0.0297112837433815, -0.10555993020534515, -0.002774628344923258, 0.002925984328612685, -0.0067727272398769855, -0.016148535534739494, -0.031044531613588333, 0.032095614820718765, -0.02497120201587677, -0.018910981714725494, 0.10947173833847046, 0.03256065025925636, -0.04182612895965576, 0.01303836703300476, 0.03151218593120575, 0.026717649772763252, 0.010246697813272476, -0.037696219980716705, -0.031467583030462265, 0.08748533576726913, -0.0036044602748006582, -0.08027239888906479, 0.01483034435659647, -0.04553419351577759, 0.04549260810017586, 0.07316212356090546, -0.007193677593022585, 0.01394373457878828, -0.032331425696611404, 0.0075611574575304985, -0.03391305357217789, -0.05285157263278961, -0.049182213842868805, -0.022868340834975243, -0.016558527946472168, -0.06015299633145332, 0.10054732859134674, -0.014886914752423763, -0.030043963342905045, 0.0032423806842416525, -0.0469001829624176, 0.020803172141313553, 0.005404213909059763, 0.019342362880706787, 0.05002911388874054, 0.029094690456986427, -0.025115568190813065, 0.028066284954547882, 0.008589125238358974, -0.02311437949538231, 0.0347585454583168, -0.03288489580154419, 0.04010147601366043, 0.035410962998867035, 0.0029163449071347713, 0.039812393486499786, 0.03963933885097504, -0.11039528250694275, -0.08515773713588715, -0.23739361763000488, 0.010736679658293724, -0.005952349863946438, -0.028342757374048233, 0.01936827227473259, -0.0370401106774807, 0.011160996742546558, -0.0016837491421028972, 0.02842540852725506, 0.06531500816345215, 0.09065114706754684, -0.010841632261872292, -0.021066568791866302, 0.018920734524726868, -0.008116710931062698, 0.019144952297210693, -0.009744578041136265, -0.001482647261582315, -0.03147488459944725, -0.03485264629125595, -0.05092224106192589, 0.03191832825541496, 0.006943232845515013, -0.08426515012979507, 0.028217755258083344, -0.04599885269999504, 0.222390815615654, 0.07923192530870438, -0.00745565677061677, -0.013852722942829132, 0.03160818666219711, 0.03859993815422058, -0.035699501633644104, -0.08671820163726807, 0.05247056484222412, 0.034221258014440536, 0.017171764746308327, -0.014771334826946259, -0.010538923554122448, -0.04060794785618782, 0.0013959028292447329, 0.03706067427992821, -0.020932704210281372, -0.055860523134469986, 0.00690174987539649, -0.024400103837251663, -0.0452660396695137, 0.013982146047055721, -0.0050063063390553, 0.01737101748585701, 0.00859866477549076, 0.017177162691950798, 0.008703093975782394, 0.01760892942547798, -0.005134083796292543, -0.04868150129914284, -0.07057347893714905, 0.00618187990039587, -0.001627496094442904, 0.05965088680386543, -0.036169033497571945, -0.06918075680732727, 0.003260127967223525, -0.06984417885541916, 0.06831452995538712, 0.034702129662036896, -0.013836666941642761, -0.033460624516010284, 0.010228095576167107, -0.03228306397795677, -0.0339503139257431, 0.08851385861635208, 0.03252507746219635, -0.03389359265565872, 0.06616425514221191, 0.02500172145664692, 0.022797968238592148, 0.015854250639677048, 0.015879925340414047, -0.03402126953005791, 0.05065184831619263, -0.0033704715315252542, 0.004590668249875307, 0.050472989678382874, 0.04571155831217766, 0.026640912517905235, 0.034920960664749146, -0.04590407758951187, 0.03998217731714249, -0.061680302023887634, -0.034456487745046616, -0.0057850671000778675, -0.0460050143301487, 0.004767029546201229, 0.017168043181300163, 0.007605276070535183, -0.33810681104660034, 0.06995153427124023, 0.03684888407588005, 0.028598077595233917, 0.007747541181743145, 0.011672311462461948, 0.019045701250433922, 0.002033150987699628, -0.027167312800884247, 0.012276207096874714, 0.012175445444881916, 0.03342469781637192, 0.03794267401099205, -0.01734568364918232, -0.001545748207718134, 0.03367834538221359, 0.04167855158448219, -0.0524417981505394, 0.05178222060203552, -0.049992628395557404, -0.004444248974323273, 0.010754465125501156, 0.22358542680740356, -0.010076655074954033, -0.0405007041990757, 0.0071006715297698975, -0.014169887639582157, 0.013486807234585285, 0.02465200237929821, 0.023662036284804344, 0.02310379594564438, 0.011358965188264847, 0.05999661609530449, -0.009197123348712921, 0.027109993621706963, 0.07294660061597824, -0.07080349326133728, 0.024963684380054474, 0.011626895517110825, -0.02882321923971176, -0.018381046131253242, 0.013967648148536682, -0.04896395280957222, -0.026756534352898598, 0.09664542973041534, -0.01911032572388649, -0.011640944518148899, -0.0400100015103817, 0.030291395261883736, -0.001927061122842133, -0.05038018897175789, 0.0021414202637970448, -0.020654277876019478, 0.015667522326111794, 0.04866703972220421, 0.02749752067029476, 0.001613045809790492, -0.031218186020851135, -0.04382270574569702, 0.018617307767271996, 0.027293995022773743, -0.028466667979955673, -0.0066861920058727264, 0.016552751883864403, 0.03907334432005882 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
[4]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt3582d0a3071426e3/6504a69f0433c043b6255189/image12.png [5]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltb4253f96c019874e/6504a6bace38f40f4df4cddf/image1.png [6]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt2840c92b6d1ee85d/6504a6d7da83c92f49f9b77e/image7.png
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.033198919147253036, -0.0022858805023133755, 0.022573476657271385, -0.02531513385474682, 0.03371371701359749, 0.015225160866975784, -0.0071481396444141865, 0.02401105873286724, -0.0070181055925786495, -0.030547870323061943, 0.01906142570078373, -0.0800822526216507, 0.038136571645736694, 0.010626445524394512, 0.043546512722969055, -0.0042696259915828705, 0.03254803642630577, 0.019809944555163383, -0.07445339858531952, 0.03433385118842125, 0.056998398154973984, -0.03486727923154831, 0.02157694287598133, -0.07108138501644135, 0.0164504274725914, 0.017839718610048294, -0.023360515013337135, -0.004097539931535721, -0.043386634439229965, -0.19063469767570496, -0.011279252357780933, -0.07269637286663055, 0.028276560828089714, -0.05187981203198433, 0.012873043306171894, -0.008315780200064182, -0.04162700101733208, 0.07858150452375412, -0.033813029527664185, 0.03405418619513512, 0.05420888960361481, -0.04021838679909706, -0.0537976399064064, -0.05061258375644684, -0.03711767494678497, -0.05019894614815712, -0.0336451381444931, -0.014871042221784592, 0.030789319425821304, -0.044872984290122986, 0.01713888719677925, -0.01759675145149231, -0.023406853899359703, 0.04189138859510422, 0.03165624663233757, 0.028651980683207512, 0.07435121387243271, 0.030462613329291344, 0.022416964173316956, 0.06268622726202011, 0.048118773847818375, 0.08193116635084152, -0.21898354589939117, 0.07858488708734512, 0.04741577059030533, 0.02727573551237583, -0.03497043251991272, 0.005243723746389151, -0.00004578452717396431, 0.052361246198415756, -0.036974892020225525, 0.021499810740351677, 0.017836427316069603, 0.008897319436073303, 0.006584326736629009, -0.04035778343677521, -0.028092481195926666, -0.017533868551254272, -0.0449560284614563, -0.03803082928061485, -0.03019518218934536, -0.0018723482498899102, -0.016236795112490654, -0.0312429741024971, 0.011088656261563301, -0.007228701375424862, -0.04938778653740883, -0.0931878611445427, 0.051291365176439285, 0.0403275266289711, -0.02616923861205578, 0.014036363922059536, -0.007983280345797539, 0.022340010851621628, -0.07233211398124695, -0.02261924184858799, 0.03395822271704674, -0.003649866906926036, -0.009908266365528107, 0.18544766306877136, -0.09505559504032135, 0.00816910807043314, 0.05316789820790291, -0.002757854061201215, 0.026514463126659393, -0.04514184966683388, 0.01537882350385189, -0.03095266968011856, -0.011010943911969662, 0.042757485061883926, 0.021181216463446617, -0.023176036775112152, 0.0782473087310791, -0.04408131167292595, 0.0065568904392421246, -0.012339993380010128, 0.01801077462732792, -0.0032826093956828117, -0.04266708716750145, -0.027855101972818375, -0.010729597881436348, 0.025088490918278694, 0.04117903485894203, -0.005419822875410318, 0.04642084240913391, -0.015158414840698242, 0.04843129217624664, 0.09865046292543411, 0.06300949305295944, 0.05178951099514961, 0.0662788599729538, 0.011769360862672329, 0.019443318247795105, -0.001953026163391769, -0.030779898166656494, 0.05413922667503357, 0.01151338778436184, -0.027742763981223106, 0.019092880189418793, -0.032502464950084686, -0.03243037685751915, -0.17038074135780334, 0.0006044200854375958, -0.07792956382036209, 0.0015807868912816048, 0.0887560099363327, -0.010918068699538708, 0.007848512381315231, -0.08934175223112106, 0.018389245495200157, 0.013817713595926762, 0.04080244153738022, -0.012879744172096252, 0.021920107305049896, 0.019269540905952454, 0.002490215701982379, 0.024582860991358757, 0.08479497581720352, -0.05330563709139824, -0.013343692757189274, -0.028988609090447426, -0.0689447745680809, -0.03597944602370262, 0.10196732729673386, 0.018165457993745804, -0.08213851600885391, -0.012308740057051182, 0.00160260742995888, -0.00265888380818069, -0.018515143543481827, -0.04078608378767967, 0.03701688349246979, -0.025721369311213493, 0.015325460582971573, 0.12639279663562775, 0.02791423536837101, -0.03450769558548927, 0.0002143599122064188, -0.008183064870536327, 0.029040588065981865, 0.012919522821903229, -0.029112929478287697, -0.0503716766834259, 0.08631465584039688, -0.0027802507393062115, -0.04785696789622307, 0.012793167494237423, -0.05892014503479004, 0.0665079653263092, 0.06150402873754501, -0.010111730545759201, 0.011182140558958054, -0.035944078117609024, 0.013105111196637154, -0.03328019008040428, -0.0566975437104702, -0.04446481168270111, -0.05763756483793259, -0.02145901694893837, -0.0469912588596344, 0.08934114873409271, -0.011573570780456066, -0.0383332185447216, 0.0008563960436731577, -0.02678391896188259, 0.013315063901245594, 0.002958862576633692, 0.026976870372891426, 0.057435788214206696, 0.04149730131030083, -0.036786921322345734, 0.048667289316654205, 0.030898908153176308, -0.02889849618077278, 0.025329871103167534, -0.03320141136646271, 0.029714250937104225, 0.05480716750025749, 0.012504933401942253, 0.018122268840670586, 0.021116767078638077, -0.11223025619983673, -0.07809781283140182, -0.2117367386817932, 0.014434564858675003, -0.006084970664232969, -0.05028528347611427, 0.02564268931746483, -0.01976524479687214, 0.016739828512072563, -0.007503113709390163, 0.018201155588030815, 0.056878432631492615, 0.09206964075565338, -0.013359958305954933, -0.015397023409605026, 0.01596491038799286, -0.00015659230120945722, 0.022432422265410423, -0.0037582966033369303, 0.002341671148315072, -0.034727200865745544, -0.04056744650006294, -0.04592815041542053, 0.012988084927201271, -0.004028731025755405, -0.06673359125852585, 0.02802257426083088, -0.03276669234037399, 0.23333097994327545, 0.07857654243707657, 0.007570317480713129, 0.005296426825225353, 0.04419112205505371, 0.04954863339662552, -0.026849878951907158, -0.07610703259706497, 0.04564943537116051, 0.04190395772457123, 0.0014019233640283346, -0.016048511490225792, -0.02326292358338833, -0.03221507743000984, 0.004000186454504728, 0.033194899559020996, -0.02307564578950405, -0.062011685222387314, 0.008221452124416828, -0.016739407554268837, -0.05621600151062012, 0.022133830934762955, 0.001840591779910028, 0.029891127720475197, 0.004388786386698484, 0.011556578800082207, 0.017149286344647408, 0.001445974805392325, -0.0028107084799557924, -0.04921064153313637, -0.05747976526618004, 0.004314143676310778, 0.004649179521948099, 0.07595407217741013, -0.039158642292022705, -0.06221597269177437, -0.0007684347801841795, -0.06673241406679153, 0.05434451997280121, 0.027858765795826912, -0.022259654477238655, -0.025333276018500328, 0.019680282101035118, -0.039006307721138, -0.028907593339681625, 0.09427249431610107, 0.015373575501143932, -0.007071612868458033, 0.061904583126306534, 0.026089895516633987, 0.015551195479929447, 0.008545148186385632, 0.012157565914094448, -0.04584570229053497, 0.06550160050392151, -0.02048306167125702, -0.006989012472331524, 0.037028804421424866, 0.03719790279865265, 0.034674160182476044, 0.017635082826018333, -0.04174625128507614, 0.059512555599212646, -0.057507943361997604, -0.00820995308458805, 0.015267841517925262, -0.04833380505442619, -0.0143606998026371, 0.01456664688885212, 0.009052406996488571, -0.3395237624645233, 0.09519651532173157, 0.04171672835946083, 0.03631976246833801, 0.006122674327343702, 0.02539139986038208, 0.02195718139410019, 0.00996317993849516, -0.03229844197630882, 0.01820760779082775, 0.001023784396238625, 0.04278334230184555, 0.03889767453074455, -0.049830589443445206, -0.004517315421253443, 0.042270660400390625, 0.018203172832727432, -0.04762643575668335, 0.04318244010210037, -0.03956616669893265, -0.0014270732644945383, 0.014670544303953648, 0.2286520004272461, -0.01785401441156864, -0.027837252244353294, 0.0206740889698267, -0.016660163179039955, -0.0014210442313924432, 0.03382359817624092, 0.023651858791708946, 0.014639443717896938, -0.0020444164983928204, 0.0483180433511734, -0.0034631015732884407, 0.015920326113700867, 0.06928186863660812, -0.07563383132219315, 0.003964685834944248, 0.012284599244594574, -0.04738304018974304, -0.02884046919643879, 0.001925690216012299, -0.05366955325007439, -0.029429947957396507, 0.09819111973047256, 0.004560461733490229, -0.008030632510781288, -0.04187512397766113, 0.01761508360505104, 0.011400289833545685, -0.031876593828201294, -0.0020461799576878548, -0.015372269786894321, 0.016300523653626442, 0.03698406368494034, 0.03554433211684227, -0.01342741958796978, -0.011463070288300514, -0.032164495438337326, 0.019075926393270493, 0.017493413761258125, -0.04732624813914299, 0.0027949349023401737, 0.02324930764734745, 0.03395672142505646 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
[7]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltd4a32140ddf600fc/6504a700ea4b5d515f5135db/image5.png [8]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt49dabfed392fa063/6504a73dbb60f713d4482608/image9.png [9]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt592e3f129fe1304b/6504a766a8cf8b5ba23e1723/image11.png
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.052878204733133316, -0.013489857316017151, 0.03641963005065918, -0.0232711024582386, 0.03356260433793068, 0.022496769204735756, -0.007606188766658306, 0.030676566064357758, 0.001556290895678103, -0.043156154453754425, 0.026905808597803116, -0.091546431183815, 0.04205445572733879, 0.03608023747801781, 0.05576189234852791, -0.01176242996007204, 0.04099374637007713, 0.026451319456100464, -0.06971706449985504, 0.017947178333997726, 0.03981706127524376, -0.004731498658657074, 0.009714175015687943, -0.07784974575042725, 0.005384838208556175, 0.019206365570425987, -0.023891109973192215, -0.0006366902962327003, -0.044260695576667786, -0.19406534731388092, -0.011127157136797905, -0.04740326479077339, 0.04493104666471481, -0.04808155819773674, 0.010882312431931496, -0.0020136386156082153, -0.028054051101207733, 0.06785876303911209, -0.03150258958339691, 0.041407614946365356, 0.0622696615755558, -0.028662780299782753, -0.06275025010108948, -0.02940436266362667, -0.02254054881632328, -0.04847060889005661, -0.01095062866806984, -0.015935854986310005, 0.030963841825723648, -0.04242918640375137, -0.01509892288595438, -0.013799132779240608, 0.00012712416355498135, 0.027317216619849205, -0.0016120037762448192, 0.021955441683530807, 0.05771872401237488, 0.017556868493556976, 0.03233608976006508, 0.05555148422718048, 0.051668621599674225, 0.0111608374863863, -0.2307746410369873, 0.06277412921190262, 0.051065679639577866, 0.019628332927823067, -0.0468066968023777, 0.0032874373719096184, -0.004143692087382078, 0.047949135303497314, -0.02142847329378128, 0.032316964119672775, -0.005162142217159271, 0.030341599136590958, 0.014510447159409523, -0.04802659898996353, -0.02193603478372097, 0.005656196735799313, -0.05310991406440735, -0.02724112570285797, -0.003104568226262927, -0.013403354212641716, -0.023104973137378693, -0.01030072569847107, 0.007185848895460367, -0.03893587738275528, -0.03678440675139427, -0.07736536115407944, 0.05770571529865265, 0.0194673053920269, -0.010833258740603924, -0.002594913821667433, -0.0027099025901407003, 0.03549187257885933, -0.07494094967842102, -0.03162816911935806, 0.03453265503048897, -0.017552092671394348, -0.00596656696870923, 0.20954667031764984, -0.09969577938318253, 0.008428136818110943, 0.07140225172042847, -0.001969369128346443, 0.04239952936768532, -0.05344377085566521, 0.003916902933269739, -0.044056594371795654, -0.033684637397527695, 0.04943167790770531, 0.0030935683753341436, -0.019567934796214104, 0.06403815001249313, -0.05509239062666893, 0.02813742682337761, -0.010951713658869267, 0.03983008861541748, 0.0019234720384702086, -0.03758734092116356, -0.0291226115077734, -0.014696433208882809, 0.03710516542196274, 0.023076068609952927, -0.013757020235061646, 0.049991674721241, -0.0126067278906703, 0.046639155596494675, 0.09888123720884323, 0.0922347754240036, 0.05575183033943176, 0.057354796677827835, -0.0019955006428062916, -0.00035762469633482397, -0.02144862711429596, -0.006764122284948826, 0.04772014170885086, 0.013733144849538803, -0.024963537231087685, 0.015966909006237984, -0.017714526504278183, -0.04465406388044357, -0.15758712589740753, 0.02127806656062603, -0.083755724132061, -0.020648345351219177, 0.08552473038434982, -0.021656041964888573, 0.018852796405553818, -0.09191308915615082, 0.008150310255587101, 0.006374067161232233, 0.028523214161396027, -0.04249982163310051, 0.006497073452919722, 0.017933649942278862, 0.0007656450034119189, 0.046353548765182495, 0.09024769067764282, -0.023034650832414627, -0.018886106088757515, -0.030529506504535675, -0.06151575222611427, -0.05592542886734009, 0.0976051315665245, 0.02653217874467373, -0.09660585969686508, -0.019618401303887367, -0.005262827966362238, 0.0021576574072241783, -0.012843734584748745, -0.03140765428543091, 0.043452244251966476, -0.02665511518716812, 0.03581659123301506, 0.12873190641403198, 0.013690361753106117, -0.03364868089556694, -0.0059813871048390865, -0.005103338975459337, 0.015828730538487434, 0.008759722113609314, -0.02949480712413788, -0.039883289486169815, 0.08568349480628967, 0.012019031681120396, -0.05261214077472687, 0.013771174475550652, -0.0371081605553627, 0.06833319365978241, 0.06619835644960403, -0.017784880474209785, 0.015165857039391994, -0.03457852452993393, 0.014268899336457253, -0.02199522778391838, -0.07495369017124176, -0.040888506919145584, -0.038936592638492584, -0.005412439350038767, -0.059327539056539536, 0.08416450768709183, -0.01670469343662262, -0.03963128849864006, 0.01286443043500185, -0.04403182119131088, 0.013827631250023842, -0.006234739441424608, -0.001219431753270328, 0.05237304046750069, 0.04489788040518761, -0.031897466629743576, 0.03873167559504509, 0.03979736194014549, -0.005890612490475178, 0.021089868620038033, -0.03696814551949501, 0.010657800361514091, 0.03329183906316757, 0.010438603349030018, 0.00842996034771204, 0.02219269424676895, -0.10187993943691254, -0.0780172273516655, -0.2185329794883728, -0.011075073853135109, -0.008956510573625565, -0.05184733867645264, 0.01190346758812666, -0.026806175708770752, 0.005381711293011904, -0.018922802060842514, 0.012761767022311687, 0.04939814656972885, 0.08007519692182541, -0.0014384918613359332, -0.04489980265498161, -0.0005792505107820034, -0.027992870658636093, -0.0031941800843924284, 0.008185304701328278, -0.005931780207902193, -0.032880447804927826, -0.02153397910296917, -0.04779686778783798, 0.027078405022621155, -0.008398502133786678, -0.07814478129148483, 0.03457925096154213, -0.020497292280197144, 0.2361929714679718, 0.08505986630916595, 0.02211461216211319, 0.011078208684921265, 0.022526295855641365, 0.05527575686573982, -0.030531706288456917, -0.11338438838720322, 0.043555304408073425, 0.03743302822113037, 0.013752039521932602, -0.010942370630800724, 0.0018757475772872567, -0.03130178153514862, -0.001529361354187131, 0.03835028037428856, -0.020207462832331657, -0.050746895372867584, 0.028938880190253258, -0.02628539688885212, -0.03620646148920059, 0.009915247559547424, -0.0030252106953412294, 0.030411096289753914, 0.01199640054255724, 0.01895882561802864, 0.015784630551934242, 0.0001601638796273619, 0.0007502480875700712, -0.025866586714982986, -0.035798072814941406, -0.005849914625287056, -0.019705357030034065, 0.09536907821893692, -0.0039177341386675835, -0.05394718050956726, -0.014880985952913761, -0.0821414515376091, 0.05945145711302757, 0.02343362383544445, -0.011508136056363583, -0.04102300480008125, 0.03480187803506851, -0.04322701692581177, -0.03981883078813553, 0.11786171048879623, 0.017868703231215477, -0.001779327867552638, 0.05559137091040611, 0.031677111983299255, 0.01874123141169548, 0.0022728799376636744, 0.017321323975920677, -0.021562686190009117, 0.057173795998096466, -0.024876773357391357, 0.003094976767897606, 0.06644411385059357, 0.030022775754332542, 0.038054849952459335, 0.030935950577259064, -0.029242856428027153, 0.07395058125257492, -0.047509416937828064, -0.01154029555618763, -0.01443321444094181, -0.045409444719552994, -0.01894613914191723, 0.019652754068374634, 0.009292829781770706, -0.32571762800216675, 0.0818919986486435, 0.027474604547023773, 0.03727542981505394, 0.009786561131477356, 0.03788187727332115, 0.028809869661927223, 0.0305417962372303, -0.04861702397465706, 0.014704886823892593, 0.0055532450787723064, 0.05964701622724533, 0.0232573002576828, -0.023470066487789154, 0.007503941189497709, 0.011217180639505386, 0.020835109055042267, -0.01700165867805481, 0.0442168302834034, -0.023679615929722786, 0.018021689727902412, 0.0032204941380769014, 0.21920964121818542, -0.037238895893096924, -0.037284594029188156, 0.012203404679894447, -0.023764636367559433, 0.0027849869802594185, 0.03951951488852501, 0.007867121137678623, 0.02714764140546322, 0.011322579346597195, 0.055059805512428284, -0.025265296921133995, 0.0007004367071203887, 0.0480443611741066, -0.06665436178445816, 0.01627306453883648, 0.002739992691203952, -0.034289564937353134, -0.025373823940753937, 0.015303097665309906, -0.05652683600783348, -0.02918943390250206, 0.08632507920265198, -0.01761591248214245, -0.002782423049211502, -0.03596871718764305, 0.036160700023174286, 0.0053726909682154655, -0.051836591213941574, 0.0025491085834801197, -0.029127882793545723, 0.006230270955711603, 0.04007701203227043, 0.039773836731910706, -0.016169149428606033, -0.009808109141886234, -0.022084740921854973, 0.009792723692953587, 0.028090879321098328, -0.03030942752957344, -0.005522020161151886, 0.026709701865911484, 0.03163189813494682 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
[10]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltbff284987187ce16/6504a78bb8c6d6c2d90e6e22/image10.png [11]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt0ae450069b31dff9/6504a7b99bf261fdd46bddcf/image3.png [12]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt7f24645eefdab69c/6504a7da9aba461d6e9a55f4/image2.png
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.039220575243234634, 0.0014963907888159156, 0.0313168466091156, -0.030745921656489372, 0.03752211108803749, 0.007079517934471369, -0.010885371826589108, 0.035174399614334106, 0.004831007681787014, -0.02534456178545952, 0.012240174226462841, -0.08202075213193893, 0.05157741904258728, 0.022976676002144814, 0.06071069836616516, -0.004206812474876642, 0.03022357076406479, 0.018206333741545677, -0.08002356439828873, 0.036331407725811005, 0.05699126049876213, -0.0059919278137385845, 0.01693529635667801, -0.04942053183913231, 0.006359849590808153, 0.014199200086295605, -0.021430233493447304, 0.012899345718324184, -0.0432102233171463, -0.1883489340543747, -0.00428227661177516, -0.0674281194806099, 0.04334862530231476, -0.027190398424863815, 0.016905521973967552, -0.023775435984134674, -0.029273517429828644, 0.07781248539686203, -0.046044349670410156, 0.042131658643484116, 0.05669810250401497, -0.028834328055381775, -0.05173196271061897, -0.06840354204177856, -0.036467015743255615, -0.04626819118857384, -0.02320273220539093, -0.01402053888887167, 0.019306516274809837, -0.054484233260154724, 0.00926812645047903, -0.02135758101940155, 0.004008454270660877, 0.045759934931993484, 0.029236307367682457, 0.04322835057973862, 0.07605019211769104, 0.042067453265190125, 0.05197610706090927, 0.05157976970076561, 0.023517442867159843, 0.0502120740711689, -0.23176433145999908, 0.07770677655935287, 0.08031974732875824, 0.025992698967456818, -0.018389994278550148, 0.008408023044466972, 0.007280978839844465, 0.040698546916246414, -0.014271986670792103, 0.007162828464061022, 0.02000986598432064, 0.02225099690258503, 0.007792205549776554, -0.05404609441757202, -0.024766985327005386, -0.0019353303359821439, -0.03762446716427803, -0.040243588387966156, -0.004652588628232479, -0.01108345203101635, -0.007937409915030003, -0.02758646011352539, 0.01618846133351326, -0.016644326969981194, -0.030315551906824112, -0.07260120660066605, 0.02978280559182167, 0.008644751273095608, -0.01352649461477995, -0.007615611422806978, -0.00805395096540451, 0.02698092721402645, -0.06429536640644073, -0.022551443427801132, 0.021108757704496384, 0.0011144948657602072, -0.025786515325307846, 0.2204580157995224, -0.08110218495130539, 0.0060717458836734295, 0.06777691096067429, -0.018440410494804382, 0.0374910868704319, -0.06872629374265671, 0.001817749347537756, -0.0487239733338356, -0.038043342530727386, 0.01824146695435047, 0.020489703863859177, -0.012250029481947422, 0.07453075796365738, -0.028921088203787804, 0.020260797813534737, -0.01984068565070629, 0.030608361586928368, -0.001663696370087564, -0.04096769168972969, -0.030240537598729134, -0.02960921823978424, 0.019039271399378777, 0.03205496072769165, -0.01863456331193447, 0.042771901935338974, -0.030129214748740196, 0.058636751025915146, 0.09054452925920486, 0.04408084228634834, 0.05186666175723076, 0.058159638196229935, -0.011581498198211193, 0.0024231141433119774, -0.005209355149418116, -0.047055672854185104, 0.0510634183883667, -0.019007913768291473, -0.02513606660068035, 0.009068702347576618, -0.03457324579358101, -0.027808522805571556, -0.1597873568534851, 0.008900818414986134, -0.07961388677358627, 0.007689405232667923, 0.08788780868053436, -0.007878717966377735, 0.00980441365391016, -0.08556213974952698, 0.01910337433218956, 0.005909652914851904, 0.04364721104502678, -0.011230558156967163, 0.014005384407937527, 0.02847515419125557, 0.008777349255979061, 0.040324416011571884, 0.08180058747529984, -0.03845817223191261, -0.02564978040754795, -0.011403370648622513, -0.06997380405664444, -0.05542059242725372, 0.10438454896211624, 0.012773880735039711, -0.09371113777160645, 0.0008203928009606898, -0.016363590955734253, -0.011228605173528194, -0.013361459597945213, -0.0306209996342659, 0.01575496792793274, -0.020906025543808937, 0.016069989651441574, 0.12217523157596588, 0.039817944169044495, -0.04104725271463394, -0.00994899682700634, -0.004832160193473101, 0.0209638848900795, 0.014051990583539009, -0.031214196234941483, -0.052434004843235016, 0.09013483673334122, 0.015379544347524643, -0.06132469326257706, 0.008870266377925873, -0.055876851081848145, 0.048261724412441254, 0.058409616351127625, -0.01776803284883499, 0.009936599060893059, -0.027589093893766403, 0.03212480619549751, -0.03725045174360275, -0.0574234314262867, -0.026514137163758278, -0.03251263499259949, -0.02450672723352909, -0.051481492817401886, 0.0930071771144867, -0.01439530961215496, -0.05344497412443161, 0.002049449598416686, -0.03826522082090378, 0.03304068371653557, 0.0013799635926261544, 0.023460248485207558, 0.05217177793383598, 0.040141183882951736, -0.03158746659755707, 0.03643341362476349, 0.019127441570162773, 0.005705598741769791, 0.027678899466991425, -0.019192194566130638, 0.008168846368789673, 0.04612806439399719, 0.0035414318554103374, 0.011649771593511105, 0.010027076117694378, -0.1105373352766037, -0.060236621648073196, -0.21322838962078094, 0.006839940790086985, 0.00044543121475726366, -0.05164841562509537, 0.019522791728377342, -0.02553117834031582, 0.008273114450275898, 0.015839828178286552, -0.0004384766798466444, 0.04394713416695595, 0.08127236366271973, 0.005908651277422905, -0.020202651619911194, 0.014712759293615818, -0.01583721861243248, 0.016307957470417023, -0.00011075381189584732, 0.008598802611231804, -0.021549135446548462, -0.04223989322781563, -0.036132171750068665, 0.0011750234989449382, 0.00687385955825448, -0.07113062590360641, 0.042755939066410065, -0.03929833322763443, 0.2395525574684143, 0.08366826921701431, -0.001273292931728065, -0.00012926557974424213, 0.03743759170174599, 0.05316752567887306, -0.021027004346251488, -0.08631861954927444, 0.040445808321237564, 0.028381068259477615, 0.0024896448012441397, -0.023736407980322838, -0.0025726621970534325, -0.03314617648720741, -0.016981156542897224, 0.049164172261953354, -0.023292671889066696, -0.05662437528371811, 0.023971527814865112, -0.021006204187870026, -0.038460686802864075, 0.021094106137752533, -0.00927578005939722, 0.04507673531770706, 0.0029500906821340322, 0.03011971339583397, 0.020435795187950134, 0.013543275184929371, -0.011522335931658745, -0.03671026602387428, -0.05891384184360504, -0.0012028055498376489, 0.014103039167821407, 0.0570252351462841, -0.012985833920538425, -0.05687301233410835, -0.014264932833611965, -0.08431433141231537, 0.03611711785197258, 0.03001321665942669, -0.016967352479696274, -0.030217329040169716, 0.06070391833782196, -0.03008502535521984, -0.016993165016174316, 0.10581505298614502, 0.009606429375708103, -0.017586832866072655, 0.06265763193368912, 0.030756540596485138, 0.006306561641395092, 0.004917612299323082, 0.01172455120831728, -0.02498462051153183, 0.06155560910701752, -0.014960408210754395, -0.008059563115239143, 0.047191571444272995, 0.026467492803931236, 0.02272416651248932, 0.02132023312151432, -0.035858042538166046, 0.04936744645237923, -0.05887160077691078, -0.005285721737891436, 0.0058136447332799435, -0.04494372382760048, -0.005719571374356747, 0.010610162280499935, 0.01613500528037548, -0.34691402316093445, 0.09854385256767273, 0.031653616577386856, 0.04408446326851845, 0.010696809738874435, 0.030564868822693825, 0.039981383830308914, 0.02018653228878975, -0.03151015564799309, 0.00010522035154281184, 0.013651035726070404, 0.030130645260214806, 0.04121632128953934, -0.028923846781253815, -0.024303585290908813, 0.032802361994981766, 0.013843313790857792, -0.022729501128196716, 0.056079305708408356, -0.026445085182785988, 0.018303535878658295, 0.0006494547706097364, 0.21679192781448364, -0.01858009770512581, -0.032626572996377945, 0.016986079514026642, -0.027856504544615746, -0.014570762403309345, 0.047625958919525146, 0.005722420290112495, 0.012712068855762482, -0.002349658403545618, 0.05239535868167877, -0.017632829025387764, 0.020216532051563263, 0.06166597828269005, -0.08503593504428864, 0.046848151832818985, -0.01726757362484932, -0.05826610326766968, -0.023450549691915512, 0.015635455027222633, -0.0483720600605011, -0.01206270046532154, 0.0828879252076149, -0.014515083283185959, -0.010742791928350925, -0.03839857131242752, 0.027888288721442223, 0.006176760420203209, -0.045204926282167435, -0.00024311445304192603, -0.008824384771287441, -0.00038183608558028936, 0.03298884257674217, -0.00929136760532856, -0.007099914364516735, -0.040015559643507004, -0.047800663858652115, 0.0035618336405605078, 0.03460535407066345, -0.04259872063994408, 0.009665783494710922, 0.015398421324789524, 0.030244801193475723 ]
devcenter
https://www.mongodb.com/developer/products/atlas/deploy-mongodb-atlas-aws-cloudformation
created
[13]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt7e1c20eba155233a/6504a8088606a80fe5c87f31/image6.png
md
{ "tags": [ "Atlas", "AWS" ], "pageDescription": "Learn how to quickly and easily deploy MongoDB Atlas instances with Amazon Web Services (AWS) CloudFormation.", "contentType": "Tutorial" }
How to Deploy MongoDB Atlas with AWS CloudFormation
2024-05-20T17:32:23.500Z
[ -0.03406836837530136, 0.00006771704647690058, 0.02773696929216385, -0.02781265787780285, 0.0114902313798666, 0.00154711096547544, -0.008149292320013046, 0.030406218022108078, -0.007993465289473534, -0.03727110102772713, 0.025482455268502235, -0.09371776878833771, 0.021128471940755844, 0.006093586329370737, 0.03577424958348274, 0.025299634784460068, 0.043913334608078, 0.018083926290273666, -0.06524261832237244, 0.020655198022723198, 0.05362739786505699, -0.028804926201701164, 0.0006429069326259196, -0.07368261367082596, 0.015417755581438541, 0.019972560927271843, -0.042586952447891235, -0.020419523119926453, -0.045866355299949646, -0.17988350987434387, 0.015743272379040718, -0.09593168646097183, 0.0431535467505455, -0.04046798497438431, 0.02365020476281643, -0.03402737155556679, -0.04787381738424301, 0.07687727361917496, -0.016618799418210983, 0.0547763854265213, 0.04107077047228813, -0.0391717255115509, -0.04747863486409187, -0.03435313701629639, -0.03710170462727547, -0.041508760303258896, -0.0028973224107176065, -0.031879812479019165, 0.033104777336120605, -0.03055734373629093, 0.006692664232105017, -0.04223446175456047, 0.014306474477052689, 0.03322705626487732, 0.01867637224495411, 0.03173799440264702, 0.058384522795677185, 0.02436339296400547, 0.03191567584872246, 0.039394550025463104, 0.011605806648731232, 0.06588325649499893, -0.20656299591064453, 0.09827636927366257, 0.05812365934252739, 0.025635981932282448, -0.03180025517940521, 0.01479154173284769, -0.005463446956127882, 0.02160009928047657, -0.0371355302631855, 0.02141287922859192, 0.018695944920182228, 0.040106046944856644, 0.021574318408966064, -0.029505530372262, 0.006493966095149517, -0.013327128253877163, -0.038404934108257294, -0.044167838990688324, -0.0046132877469062805, -0.005987206473946571, 0.0007735635153949261, 0.001009783474728465, -0.006858241278678179, -0.0469915047287941, -0.0554913692176342, -0.08483961969614029, 0.05206693708896637, 0.03416510298848152, -0.03393575921654701, -0.003958061803132296, 0.009210183285176754, 0.011993029154837132, -0.10498461127281189, -0.02160516381263733, 0.019602647051215172, 0.009420754387974739, -0.013393506407737732, 0.19561982154846191, -0.08141028136014938, 0.01846424676477909, 0.08152167499065399, -0.04661010950803757, 0.02863398939371109, -0.05699457228183746, 0.005205966532230377, -0.038409601897001266, -0.022302113473415375, 0.009718425571918488, 0.0015163264470174909, -0.00741742504760623, 0.06675288081169128, -0.06291968375444412, 0.027601070702075958, -0.014487111009657383, 0.005072006024420261, 0.00839133933186531, -0.028495244681835175, 0.002272093202918768, -0.010469766333699226, 0.02497360296547413, 0.03398173674941063, 0.0077773574739694595, 0.052349671721458435, -0.03314683958888054, 0.05509938672184944, 0.12041722983121872, 0.06761392951011658, 0.05603661388158798, 0.06083884462714195, 0.014831213280558586, 0.006193088833242655, -0.003978212829679251, -0.02268204092979431, 0.03518366068601608, 0.006624411325901747, -0.04364778473973274, -0.008876378647983074, -0.022328155115246773, -0.02832820825278759, -0.14524394273757935, 0.02120053954422474, -0.08120597898960114, -0.025331363081932068, 0.08546078950166702, -0.04657367616891861, 0.029327310621738434, -0.09498883038759232, -0.007458132691681385, -0.008583086542785168, 0.061720941215753555, -0.05174482241272926, 0.03072659857571125, 0.022161254659295082, 0.007704407908022404, 0.025423631072044373, 0.0736231580376625, -0.028861945495009422, -0.04844651371240616, 0.022464465349912643, -0.06753051280975342, -0.06287868320941925, 0.08969315141439438, 0.03916003555059433, -0.0669630914926529, -0.019377686083316803, -0.006790977902710438, 0.004182943608611822, -0.04254128038883209, -0.011984352953732014, 0.048282600939273834, -0.04985012114048004, 0.008594865910708904, 0.10257872939109802, 0.03131331875920296, -0.030488796532154083, 0.013052072376012802, -0.003152413060888648, 0.008833375759422779, 0.010249314829707146, -0.03679298609495163, -0.02836482971906662, 0.0807877853512764, 0.0007286205072887242, -0.03728156536817551, 0.046312492340803146, -0.05323728173971176, 0.04564448446035385, 0.06134698912501335, 0.0005661419709213078, 0.042130496352910995, -0.02460913360118866, 0.006191401742398739, -0.03855972737073898, -0.046557676047086716, -0.03167010843753815, -0.022333145141601562, 0.010930842719972134, -0.05051110312342644, 0.09690327942371368, -0.015974905341863632, -0.0501730777323246, -0.020660722628235817, -0.07106555998325348, 0.03634658828377724, -0.0036007119342684746, -0.0035140085965394974, 0.028850359842181206, 0.029904663562774658, -0.05177009850740433, 0.0026683034375309944, 0.020491428673267365, -0.016872351989150047, 0.00788070634007454, -0.017592931166291237, 0.023352136835455894, 0.025845659896731377, 0.01462421752512455, 0.0364677757024765, 0.038840360939502716, -0.09842699021100998, -0.07714798301458359, -0.240385040640831, 0.029491035267710686, -0.020523175597190857, -0.03090519644320011, 0.017466027289628983, -0.04124690964818001, 0.0034642263781279325, -0.024570882320404053, 0.04162082448601723, 0.06431233882904053, 0.08119753003120422, 0.02024947479367256, -0.013505637645721436, -0.00498933857306838, -0.010032327845692635, 0.04645509272813797, 0.01169230043888092, -0.011163403280079365, -0.014406521804630756, -0.01775575801730156, -0.0483851321041584, 0.007948566228151321, -0.026029052212834358, -0.0610332116484642, 0.0755239725112915, -0.048598770052194595, 0.22138412296772003, 0.0813683420419693, -0.003891199128702283, -0.03137803450226784, 0.02787448838353157, 0.043202005326747894, -0.032520830631256104, -0.09366406500339508, 0.07004395872354507, 0.039012715220451355, 0.015152818523347378, -0.0031564675737172365, -0.015432377345860004, -0.04929705336689949, -0.037309326231479645, 0.0420992486178875, -0.04800715297460556, -0.059242136776447296, 0.028288472443819046, -0.02440325915813446, -0.025087686255574226, 0.025674190372228622, 0.00003826278407359496, 0.043518807739019394, 0.03600732982158661, 0.030339157208800316, 0.0030499426648020744, 0.024786099791526794, -0.0011950250482186675, -0.03834562748670578, -0.0749417319893837, -0.01182456873357296, 0.01080723013728857, 0.07340522110462189, -0.04341334104537964, -0.03346021845936775, 0.012617123313248158, -0.04797707125544548, 0.05945241078734398, 0.029270963743329048, -0.018458204343914986, -0.026084445416927338, 0.0336909182369709, -0.020830096676945686, -0.04394625872373581, 0.09713059663772583, 0.008928593248128891, -0.00580950453877449, 0.04779495298862457, 0.0027354818303138018, 0.023460369557142258, 0.002831841353327036, 0.008362487889826298, -0.03668738156557083, 0.05445960536599159, -0.00047175868530757725, 0.017190538346767426, 0.048146769404411316, 0.057644981890916824, 0.02805962972342968, -0.010574255138635635, -0.060786399990320206, 0.04413963109254837, -0.041589781641960144, -0.004153883084654808, 0.00999846588820219, -0.07176844775676727, -0.010847075842320919, 0.03282708302140236, -0.01626751758158207, -0.32344621419906616, 0.07328274846076965, 0.0055791339837014675, 0.021693846210837364, -0.014828808605670929, 0.04423825442790985, 0.04774259030818939, 0.0323118157684803, -0.0410708524286747, 0.045106347650289536, -0.00445609400048852, 0.03254177048802376, 0.03325742855668068, -0.020525015890598297, 0.02250031940639019, 0.01856253668665886, 0.034595001488924026, -0.02877146191895008, 0.057474713772535324, -0.029781794175505638, 0.015315074473619461, -0.001151967910118401, 0.21144476532936096, -0.03150691092014313, -0.0344475582242012, 0.013143935240805149, -0.024347219616174698, 0.012555591762065887, 0.042174406349658966, 0.002837661886587739, 0.01637350767850876, 0.022465359419584274, 0.06634330004453659, -0.04994700849056244, 0.018061969429254532, 0.038603320717811584, -0.045923613011837006, 0.013882003724575043, 0.005321022123098373, -0.048753075301647186, -0.045652467757463455, 0.0003994022263213992, -0.028032032772898674, -0.012601392343640327, 0.12761861085891724, -0.008162138052284718, 0.020803451538085938, -0.01865646243095398, 0.04781221225857735, 0.006816856563091278, -0.014950063079595566, -0.0024778281804174185, -0.013261117972433567, -0.001642116461880505, 0.06335580348968506, 0.031889062374830246, 0.013940769247710705, -0.0498390831053257, -0.05360781028866768, 0.005625220946967602, 0.023976264521479607, -0.036807142198085785, -0.0145183727145195, 0.015449208207428455, 0.025289975106716156 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
# How to Integrate MongoDB Into Your Next.js App > This tutorial uses the Next.js Pages Router instead of the App Router which was introduced in Next.js version 13. The Pages Router is still supported and recommended for production environments. Are you building your next amazing application with Next.js? Do you wish you could integrate MongoDB into your Next.js app effortlessly? Do you need this done before your coffee has finished brewing? If you answered yes to these three questions, I have some good news for you. We have created a Next.js<>MongoDB integration that will have you up and running in minutes, and you can consider this tutorial your official guide on how to use it.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.05091717094182968, -0.0035527863074094057, 0.02439594268798828, -0.05126512795686722, 0.025426870211958885, -0.02679506316781044, -0.0391407236456871, 0.01078982837498188, 0.0029375809244811535, -0.003531744470819831, 0.00004127466309000738, -0.03999471664428711, 0.024899380281567574, 0.03224119171500206, 0.001976798288524151, 0.021433405578136444, -0.011468429118394852, -0.000938544690143317, -0.049989424645900726, 0.007756524719297886, 0.024946529418230057, -0.002246780088171363, -0.0058692144230008125, -0.05821923539042473, -0.009650642052292824, 0.08601300418376923, -0.03029514104127884, -0.032916150987148285, -0.034584008157253265, -0.1941824108362198, -0.013835323043167591, -0.09368574619293213, -0.0012238576309755445, -0.046573542058467865, -0.047339361160993576, -0.015169479884207249, 0.006068232469260693, 0.05097292736172676, 0.013342224061489105, 0.06273001432418823, 0.040945298969745636, 0.032206252217292786, -0.04204917326569557, -0.07652173936367035, -0.0416964590549469, -0.05409722402691841, -0.012416462413966656, -0.012394038960337639, 0.004142101388424635, -0.05554609373211861, -0.018656648695468903, -0.0712774395942688, -0.026115605607628822, -0.022590672597289085, 0.020233429968357086, 0.0682472512125969, 0.024923959746956825, 0.02388177067041397, 0.01938500441610813, 0.04863816872239113, 0.07194333523511887, 0.0035459515638649464, -0.18331864476203918, 0.101203553378582, 0.044554200023412704, 0.03330625593662262, -0.07448694109916687, -0.0420636311173439, 0.018085064366459846, 0.0538155734539032, -0.05427335202693939, 0.015242496505379677, 0.03513197973370552, 0.05022287741303444, 0.018204493448138237, -0.04425669461488724, -0.005241221282631159, -0.05899929627776146, 0.024999327957630157, 0.011191883124411106, -0.025717927142977715, -0.046977702528238297, -0.009445481933653355, 0.03177519515156746, -0.014884375035762787, -0.015360529534518719, -0.002349719638004899, -0.08228185772895813, 0.0009000630816444755, 0.014700210653245449, -0.0156841017305851, -0.04115693271160126, 0.05215592682361603, 0.033199988305568695, -0.07411722093820572, 0.002585021546110511, 0.05528777837753296, -0.000053134499466978014, 0.004826591350138187, 0.23312270641326904, -0.05690183863043785, 0.0407722145318985, 0.03817576915025711, -0.0056888386607170105, 0.023337911814451218, -0.023781156167387962, -0.006859731860458851, -0.018123658373951912, -0.00028509856201708317, 0.025164851918816566, 0.019472463056445122, -0.0677187517285347, 0.015757346525788307, -0.051445379853248596, 0.04428335279226303, -0.009513185359537601, -0.005022641737014055, 0.04346460849046707, -0.007268303539603949, 0.02109680511057377, 0.010804315097630024, 0.03493504971265793, 0.029716191813349724, 0.01827976480126381, 0.028290966525673866, -0.028687696903944016, 0.04732081666588783, 0.055762384086847305, 0.023329686373472214, 0.04742562770843506, 0.061983879655599594, -0.0032405478414148092, -0.06112872064113617, -0.00255091255530715, 0.005265861749649048, 0.012619413435459137, -0.011848954483866692, -0.008017739281058311, 0.03136352449655533, 0.013329257257282734, -0.006260094232857227, -0.06906194239854813, -0.033279504626989365, -0.10361218452453613, -0.03159485012292862, 0.06668766587972641, -0.029523324221372604, 0.08158840984106064, -0.056029126048088074, -0.053403090685606, 0.0015658425400033593, 0.05607310310006142, -0.07041587680578232, -0.011173242703080177, -0.018069710582494736, -0.011521503329277039, 0.05600748583674431, 0.04750271886587143, -0.00473367515951395, 0.013747861608862877, -0.04158681631088257, 0.020227540284395218, 0.00010034743172582239, 0.05288266763091087, -0.0028089438565075397, -0.12279108166694641, -0.007103301584720612, 0.023606352508068085, 0.012167880311608315, -0.05069129541516304, -0.02014240249991417, -0.013650167733430862, -0.06169608607888222, 0.022716594859957695, 0.11384613066911697, 0.02634431980550289, -0.03192305564880371, 0.007045275531709194, -0.025749176740646362, 0.011024251580238342, 0.03271378204226494, -0.02434084564447403, -0.04709038510918617, 0.02962220273911953, 0.011448254808783531, -0.04507189244031906, -0.011065271683037281, -0.055643897503614426, 0.047870784997940063, 0.05547838658094406, -0.020709024742245674, 0.012636279687285423, -0.02164778672158718, -0.00038663868326693773, 0.00784329790621996, -0.05662262812256813, -0.02110632136464119, -0.014531365595757961, 0.02639545314013958, -0.08199247717857361, 0.11974065750837326, 0.04073543846607208, -0.005214844364672899, 0.019737111404538155, -0.03783796727657318, 0.04749394208192825, -0.005841271486133337, -0.03615718334913254, 0.05104649439454079, -0.013257973827421665, -0.07252337783575058, 0.02002214826643467, 0.08578865230083466, -0.00485258037224412, -0.04227946698665619, 0.00880385097116232, 0.02491885796189308, 0.05757514014840126, 0.023765375837683678, 0.062491513788700104, 0.011953075416386127, -0.0316540002822876, -0.03351345658302307, -0.25816166400909424, 0.022341439500451088, 0.02964882180094719, 0.02400124818086624, 0.01982174441218376, -0.0721568912267685, 0.004243356175720692, 0.00500010559335351, -0.03381378576159477, 0.08454510569572449, 0.08820424228906631, -0.004894360899925232, 0.04018131643533707, 0.025943780317902565, -0.025831051170825958, 0.04308483377099037, 0.07344406843185425, -0.019239995628595352, -0.04406068101525307, 0.013592447154223919, 0.021237926557660103, -0.009327942505478859, -0.009220173582434654, -0.10683663189411163, 0.031009869650006294, 0.014545430429279804, 0.20593386888504028, 0.05250898748636246, 0.010972438380122185, -0.08920440077781677, 0.0697258710861206, 0.01930924691259861, -0.031150052323937416, -0.11230706423521042, 0.01505518238991499, 0.005289075430482626, 0.03821565955877304, -0.03006415069103241, -0.007332813460379839, -0.02854951284825802, -0.055661872029304504, 0.021685589104890823, 0.027988117188215256, -0.10558728873729706, -0.017645375803112984, -0.024441178888082504, -0.02409949153661728, -0.01865161769092083, -0.029265856370329857, 0.036922555416822433, -0.01158179622143507, 0.028760408982634544, 0.04695579409599304, 0.039627183228731155, -0.021582387387752533, -0.00415594968944788, -0.03746304661035538, 0.007822525687515736, -0.0429777055978775, 0.05680195242166519, -0.013025768101215363, -0.02875450626015663, 0.01612059772014618, -0.03851756453514099, 0.07272335141897202, 0.02167251892387867, -0.009647408500313759, -0.02476075477898121, 0.042257681488990784, -0.025790825486183167, -0.006107128690928221, 0.0660335123538971, 0.007454180624336004, 0.051285579800605774, 0.03537822142243385, 0.04438701644539833, 0.0213167741894722, -0.01690736785531044, -0.021796835586428642, -0.0054825362749397755, 0.03278861939907074, -0.038806188851594925, 0.029930563643574715, 0.04113677144050598, 0.019265437498688698, 0.03107837215065956, 0.0479244664311409, -0.03784039989113808, -0.006811807863414288, -0.02110147289931774, -0.05536966770887375, -0.005576061550527811, -0.043375808745622635, -0.04437219351530075, 0.012395961210131645, 0.014959515072405338, -0.27377399802207947, 0.014676121063530445, -0.00907469354569912, 0.019891224801540375, -0.0169538427144289, 0.017129629850387573, 0.047726064920425415, 0.012538055889308453, -0.011473475024104118, 0.034665003418922424, 0.02703654207289219, 0.01858132891356945, 0.03097274713218212, 0.012177926488220692, 0.017160998657345772, 0.07510846853256226, 0.05326573923230171, -0.0490143820643425, 0.022790683433413506, -0.031579066067934036, 0.07529531419277191, 0.024233760312199593, 0.2400868535041809, 0.03129355609416962, 0.006892454344779253, 0.09261294454336166, -0.019059738144278526, 0.05561212822794914, 0.040934089571237564, -0.0013742496958002448, -0.011815257370471954, -0.0008051503100432456, 0.11562235653400421, -0.04851648211479187, 0.04128791764378548, 0.02377310022711754, -0.030870184302330017, 0.05500534549355507, 0.03089725226163864, -0.05250129476189613, -0.05045565217733383, -0.008514393121004105, -0.0323677584528923, 0.0017306925728917122, 0.09140348434448242, -0.05941510200500488, -0.05592602118849754, -0.06843049824237823, 0.02656763419508934, 0.015431605279445648, -0.03425810858607292, -0.07269496470689774, -0.016434600576758385, -0.042040951550006866, 0.025940075516700745, 0.022581029683351517, 0.0008705137297511101, -0.0007916667964309454, -0.05919170379638672, -0.017382705584168434, 0.04387384280562401, -0.06611934304237366, 0.007748652249574661, 0.003953581675887108, 0.007669810205698013 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
In this tutorial, we'll take a look at how we can use the **with-mongodb** example to create a new Next.js application that follows MongoDB best practices for connectivity, connection pool monitoring, and querying. We'll also take a look at how to use MongoDB in our Next.js app with things like serverSideProps and APIs. Finally, we'll take a look at how we can easily deploy and host our application on Vercel, the official hosting platform for Next.js applications. If you already have an existing Next.js app, not to worry. Simply drop the MongoDB utility file into your existing project and you are good to go. We have a lot of exciting stuff to cover, so let's dive right in!
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.06978491693735123, 0.015135692432522774, 0.016253117471933365, -0.07611209154129028, 0.03712327033281326, -0.00919279269874096, -0.021473359316587448, 0.003786151995882392, -0.0037624710239470005, -0.030912041664123535, -0.0008145315223373473, -0.048215605318546295, 0.022445082664489746, 0.04416751116514206, -0.019974790513515472, 0.03414493799209595, -0.017782699316740036, 0.009398085065186024, -0.05839480087161064, 0.012871540151536465, 0.012701951898634434, 0.005495065823197365, -0.027143780142068863, -0.0775163397192955, -0.01419161632657051, 0.08252586424350739, -0.03579434007406235, -0.035086989402770996, -0.05002441629767418, -0.20512397587299347, -0.021401574835181236, -0.09600313007831573, -0.001746277674101293, -0.03899312764406204, -0.026395613327622414, -0.014540261588990688, 0.01745045743882656, 0.03854832053184509, -0.0027309763245284557, 0.054032597690820694, 0.050500497221946716, 0.016033226624131203, -0.03289191424846649, -0.07550568878650665, -0.03201955184340477, -0.06447649002075195, -0.0009053550311364233, -0.021726636216044426, -0.014731062576174736, -0.05262221395969391, -0.01018566358834505, -0.0529337003827095, -0.029915515333414078, -0.015112140215933323, 0.032460227608680725, 0.06310427188873291, 0.0360567569732666, 0.025371884927153587, -0.0017522493144497275, 0.030997876077890396, 0.07579959183931351, 0.0045175980776548386, -0.15283161401748657, 0.09587325155735016, 0.05151117220520973, 0.05177130177617073, -0.057544637471437454, -0.01226898655295372, 0.03307749330997467, 0.031996164470911026, -0.034800488501787186, 0.015377352014183998, 0.03603041544556618, 0.06345076113939285, 0.012116268277168274, -0.031096026301383972, -0.006057668011635542, -0.06611596047878265, 0.02924199216067791, 0.013215540908277035, -0.025287974625825882, -0.05130362883210182, -0.006816762965172529, 0.032249514013528824, -0.03745943680405617, -0.02143552526831627, -0.003536927280947566, -0.04585721343755722, 0.011979583650827408, 0.017027027904987335, -0.027000118046998978, -0.03045051544904709, 0.03216405212879181, 0.016983667388558388, -0.05667410418391228, 0.010799623094499111, 0.02456134557723999, 0.0038638829719275236, -0.02436644956469536, 0.23094770312309265, -0.0567457340657711, 0.04124704748392105, 0.031730178743600845, -0.007460569031536579, 0.028524843975901604, -0.037267718464136124, -0.0033463991712778807, -0.04055338352918625, 0.005273960996419191, 0.015580288134515285, -0.001258021336980164, -0.054277174174785614, 0.025685373693704605, -0.060349397361278534, 0.025504471734166145, -0.006228549871593714, 0.002767411759123206, 0.034443262964487076, -0.005050540901720524, 0.024685708805918694, 0.029589368030428886, 0.03920089080929756, 0.04883834719657898, 0.03042478673160076, 0.0719103291630745, -0.02523965761065483, 0.05317617580294609, 0.050350554287433624, -0.0055040097795426846, 0.06656058132648468, 0.03409722447395325, -0.023923611268401146, -0.07258587330579758, -0.010151907801628113, 0.022670507431030273, 0.023860452696681023, -0.008514112792909145, 0.004782262723892927, 0.039377715438604355, 0.035400182008743286, 0.0057624285109341145, -0.05183570832014084, -0.025042971596121788, -0.11151435226202011, -0.025223609060049057, 0.07187709957361221, -0.014141484163701534, 0.08713173866271973, -0.0533587746322155, -0.06112455949187279, 0.008302771486341953, 0.05992890149354935, -0.06918767094612122, 0.0006998549215495586, -0.007582675199955702, -0.0008675948483869433, 0.03566182404756546, 0.06374844908714294, -0.028346847742795944, 0.007886606268584728, -0.06603539735078812, 0.005894755944609642, 0.003151633543893695, 0.07575996965169907, -0.001940170070156455, -0.12904572486877441, 0.02367575466632843, 0.0215156227350235, 0.024638157337903976, -0.03615885600447655, -0.011399171315133572, -0.0010944086825475097, -0.07101787626743317, 0.011683862656354904, 0.0973312184214592, 0.020780477672815323, -0.0627259835600853, -0.007530468050390482, -0.031086822971701622, 0.009090689942240715, 0.016027316451072693, -0.029524659737944603, -0.062266167253255844, 0.031591594219207764, 0.00030728726414963603, -0.05459071323275566, 0.019168319180607796, -0.048769261687994, 0.03617478534579277, 0.04163876548409462, -0.0534481480717659, -0.0163325946778059, -0.017533134669065475, -0.02396078035235405, 0.0000816892134025693, -0.05250230059027672, -0.020953524857759476, -0.0186543557792902, 0.021991444751620293, -0.06712523847818375, 0.10088404268026352, 0.0496341772377491, 0.0002037979575106874, 0.05739052593708038, -0.021351970732212067, 0.05291546881198883, -0.016961004585027695, -0.02074442058801651, 0.03189082816243172, 0.0014894185587763786, -0.07191293686628342, 0.025358125567436218, 0.055021822452545166, 0.011538990773260593, -0.04289507865905762, -0.00722874840721488, 0.00538419745862484, 0.04742186889052391, 0.039494648575782776, 0.06448905169963837, 0.012426423840224743, -0.03708759695291519, -0.02998306415975094, -0.272125244140625, 0.013913619332015514, 0.006530481856316328, -0.004843701608479023, 0.016603872179985046, -0.04523259773850441, 0.018314946442842484, -0.02281567081809044, -0.030318183824419975, 0.06366127729415894, 0.0897589847445488, -0.02363942377269268, 0.05990687012672424, 0.012026634067296982, -0.012347932904958725, 0.052302587777376175, 0.07378408312797546, -0.010143565014004707, -0.023783991113305092, 0.007119054906070232, 0.004630513954907656, 0.0009634534362703562, -0.005375122185796499, -0.0913892611861229, 0.050958070904016495, 0.012754728086292744, 0.18959324061870575, 0.061230678111314774, -0.00848595891147852, -0.08869937062263489, 0.06245489791035652, -0.02125898003578186, -0.01494342740625143, -0.12391834706068039, 0.0021618299651890993, 0.000949185574427247, 0.05712667480111122, -0.0027648855466395617, -0.009928365238010883, -0.028334956616163254, -0.046815790235996246, 0.021364320069551468, 0.032939549535512924, -0.10675504803657532, -0.01908445917069912, -0.026943372562527657, -0.03662366047501564, -0.01220142375677824, -0.04174051806330681, 0.030047323554754257, -0.028455138206481934, 0.03618548810482025, 0.03211764618754387, 0.01487378217279911, -0.026474017649888992, -0.007922583259642124, -0.05949686840176582, 0.0030331809539347887, -0.03019961714744568, 0.0721687376499176, 0.0037270793691277504, -0.027193818241357803, -0.000517222797498107, -0.031359996646642685, 0.06674376130104065, -0.0011340599739924073, -0.016554472967982292, -0.035527464002370834, 0.020726030692458153, -0.05233500897884369, -0.014366699382662773, 0.05579408258199692, -0.005353578366339207, 0.0381084568798542, 0.027679434046149254, 0.036024536937475204, 0.017270857468247414, -0.0246291421353817, -0.013732126913964748, -0.0015867931069806218, 0.04755376651883125, -0.029634160920977592, 0.03446353226900101, 0.032723017036914825, 0.022752128541469574, 0.050514549016952515, 0.06969834864139557, 0.016572291031479836, 0.019470375031232834, -0.019949818029999733, -0.04591250792145729, -0.022585777565836906, -0.045680221170186996, -0.03431957960128784, -0.007064596749842167, 0.0015652724541723728, -0.2965097427368164, 0.031006522476673126, -0.009133238345384598, 0.011662743985652924, -0.015410526655614376, 0.03674178943037987, 0.043210383504629135, 0.024615243077278137, -0.019451957195997238, 0.051654744893312454, 0.044263582676649094, 0.007806308567523956, 0.03229772299528122, 0.021463550627231598, 0.028604140505194664, 0.06725332140922546, 0.05271918699145317, -0.043794192373752594, 0.019155636429786682, -0.03667198494076729, 0.06228741630911827, 0.03508786857128143, 0.23406508564949036, 0.01783333718776703, 0.010700720362365246, 0.09516967833042145, -0.024443136528134346, 0.0701150968670845, 0.039867620915174484, 0.02710391953587532, -0.02900630049407482, 0.019115956500172615, 0.10763037204742432, -0.04820100590586662, 0.025323564186692238, 0.019603291526436806, -0.035947635769844055, 0.055351823568344116, 0.032638680189847946, -0.04240144044160843, -0.023412028327584267, -0.0038956059142947197, -0.011959262192249298, 0.026370307430624962, 0.08291097730398178, -0.04666953533887863, -0.04856514185667038, -0.07208746671676636, 0.03968963772058487, 0.0024004869628697634, -0.03881052881479263, -0.07376480102539062, -0.0037135405000299215, -0.019916506484150887, 0.032514866441488266, 0.009978817775845528, -0.005380206275731325, 0.017512496560811996, -0.03711187094449997, -0.007411798927932978, 0.045869775116443634, -0.08513329923152924, 0.025793999433517456, 0.013616912998259068, 0.024650461971759796 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
## Next.js and MongoDB with one click Our app is now deployed and running in production. If you weren't following along with the tutorial and just want to quickly start your Next.js application with MongoDB, you could always use the `with-mongodb` starter found on GitHub, but I’ve got an even better one for you. Visit Vercel and you'll be off to the races in creating and deploying the official Next.js with the MongoDB integration, and all you'll need to provide is your connection string. ## Prerequisites For this tutorial, you'll need: - MongoDB Atlas (sign up for free). - A Vercel account (sign up for free). - NodeJS 18+. - npm and npx. To get the most out of this tutorial, you need to be familiar with React and Next.js. I will cover unique Next.js features with enough details to still be valuable to a newcomer.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.07331588119268417, -0.007387739606201649, 0.03933708369731903, -0.0619853138923645, 0.03491160646080971, 0.010563663206994534, -0.03459610417485237, -0.0009352266788482666, -0.0017970841145142913, -0.04273605719208717, -0.004332574084401131, -0.07404487580060959, 0.025871461257338524, 0.03922523185610771, -0.01671157032251358, 0.03944030776619911, -0.028572209179401398, -0.015947306528687477, -0.06463560461997986, 0.01479289960116148, 0.015530850738286972, -0.008364940993487835, -0.02152569778263569, -0.06451401114463806, 0.011999586597084999, 0.06756478548049927, -0.027516599744558334, -0.04389427229762077, -0.04849132150411606, -0.20658591389656067, -0.024325590580701828, -0.07492492347955704, 0.029455581679940224, -0.05667176470160484, -0.02158418297767639, -0.012818306684494019, 0.0050245351158082485, 0.03620276227593422, -0.004117950797080994, 0.03940015658736229, 0.04048406332731247, 0.03831399977207184, -0.02980363927781582, -0.07660707086324692, -0.03996184095740318, -0.05791882798075676, -0.013436621986329556, -0.019927337765693665, 0.0022381541784852743, -0.04961968958377838, -0.009574130177497864, -0.06134111434221268, -0.024368708953261375, -0.0017477323999628425, 0.021892542019486427, 0.05447577312588692, 0.02392248623073101, 0.029006218537688255, 0.008336467668414116, 0.037014856934547424, 0.06099792197346687, 0.00414718221873045, -0.18098139762878418, 0.0922403335571289, 0.05924711748957634, 0.051206525415182114, -0.03686194866895676, -0.024910734966397285, 0.038070108741521835, 0.023885561153292656, -0.033498749136924744, 0.002593698911368847, 0.03272680193185806, 0.0454225018620491, 0.013204468414187431, -0.04037195444107056, -0.0074588945135474205, -0.046481210738420486, 0.03503293916583061, 0.014459611847996712, -0.028618136420845985, -0.050238631665706635, -0.026414653286337852, 0.03721113130450249, -0.022576062008738518, 0.007808460388332605, -0.007764861453324556, -0.046465784311294556, -0.00316041661426425, 0.02514178864657879, -0.010806785896420479, -0.01907517947256565, 0.03960632160305977, 0.04177326709032059, -0.06330437958240509, 0.006728176027536392, 0.02562958560883999, 0.023945549502968788, -0.014154368080198765, 0.2412060648202896, -0.052633803337812424, 0.0410207100212574, 0.05523170530796051, -0.005965750198811293, 0.03443983942270279, -0.021222049370408058, -0.018001126125454903, -0.040219198912382126, 0.003124079667031765, 0.01250262837857008, 0.016767682507634163, -0.059822455048561096, 0.02864775061607361, -0.06065438687801361, 0.03454191982746124, 0.01601707935333252, 0.012642532587051392, 0.028907885774970055, -0.001340603339485824, 0.010909777134656906, 0.03936793655157089, 0.05615006014704704, 0.03575919568538666, 0.0030724790412932634, 0.05920843407511711, -0.00900844857096672, 0.06126304343342781, 0.06176431104540825, 0.002625616267323494, 0.06836216151714325, 0.046778932213783264, -0.0033706887625157833, -0.07532382756471634, -0.001086061936803162, 0.0340750627219677, 0.006240224000066519, -0.030343573540449142, 0.007759819272905588, 0.041047126054763794, 0.03993977978825569, -0.011479736305773258, -0.06582191586494446, -0.02722351998090744, -0.10875304043292999, -0.020706383511424065, 0.07471726834774017, -0.010847508907318115, 0.09399361908435822, -0.057210445404052734, -0.018846074119210243, -0.002334938384592533, 0.05634039267897606, -0.07196945697069168, 0.010289129801094532, 0.005702918861061335, -0.013051447458565235, 0.028754794970154762, 0.041684698313474655, -0.041802261024713516, 0.010203010402619839, -0.04673342779278755, -0.00046972918789833784, -0.004099685233086348, 0.06803982704877853, 0.0038889909628778696, -0.15017326176166534, 0.004330740775913, 0.03542378172278404, 0.027107492089271545, -0.03982854261994362, -0.03646289184689522, 0.005782955326139927, -0.0691777691245079, -0.0006251517916098237, 0.11709456145763397, 0.00983674731105566, -0.03647208586335182, -0.003524337662383914, -0.025070518255233765, 0.03125905990600586, 0.014232529327273369, -0.040200695395469666, -0.04894094169139862, 0.028651157394051552, -0.013583438470959663, -0.04786604270339012, -0.013122708536684513, -0.04607729986310005, 0.03596339747309685, 0.03762170299887657, -0.013934175483882427, -0.012757026590406895, -0.0137794716283679, -0.03666405379772186, 0.001474824151955545, -0.05474640801548958, -0.027704186737537384, -0.022138400003314018, 0.02453397773206234, -0.07125049084424973, 0.09932531416416168, 0.037266094237565994, 0.000397924188291654, 0.07024659216403961, -0.010160335339605808, 0.038297753781080246, 0.001520052901469171, -0.01666647382080555, 0.022201906889677048, -0.023467982187867165, -0.04907865822315216, 0.03247081860899925, 0.05242757871747017, 0.013557791709899902, -0.03891795873641968, -0.009346330538392067, 0.01538452785462141, 0.0690205916762352, 0.029725514352321625, 0.06698543578386307, 0.021053873002529144, -0.060054343193769455, -0.040652453899383545, -0.2568235993385315, 0.030159981921315193, 0.007401291746646166, 0.010984055697917938, 0.0013800980523228645, -0.024525877088308334, 0.03342406451702118, -0.017276231199502945, -0.01952975243330002, 0.05936206132173538, 0.08513833582401276, -0.008849481120705605, 0.052533458918333054, -0.006213529035449028, -0.00026410058490000665, 0.053239718079566956, 0.07284138351678848, 0.0029373751021921635, -0.021101390942931175, -0.0036758154164999723, 0.0006143689970485866, -0.02441822737455368, 0.006578937638550997, -0.11012883484363556, 0.04390376806259155, 0.0023429603315889835, 0.20001965761184692, 0.07547643035650253, -0.008383099921047688, -0.0928964912891388, 0.06743600219488144, -0.021312247961759567, -0.01430673711001873, -0.13094548881053925, 0.008768003433942795, -0.009785082191228867, 0.04356499761343002, -0.013193102553486824, -0.01816278137266636, -0.02208106219768524, -0.051380451768636703, 0.013956530019640923, 0.023755408823490143, -0.10581423342227936, -0.032057058066129684, -0.022525930777192116, -0.06938018649816513, -0.0038748702500015497, -0.04405724257230759, 0.03047611378133297, -0.015839509665966034, 0.04632524400949478, 0.05166022107005119, 0.017555218189954758, -0.038290925323963165, -0.01742487959563732, -0.07772840559482574, 0.0001073824314516969, -0.041879262775182724, 0.054008182138204575, 0.008442769758403301, -0.0026055206544697285, 0.005843858700245619, -0.0364333912730217, 0.05971580371260643, -0.0079790148884058, -0.01303565502166748, -0.029720602557063103, 0.04298872500658035, -0.05765737593173981, -0.005059125367552042, 0.05200256034731865, 0.0021240415517240763, 0.01632259041070938, 0.030769571661949158, 0.03692095726728439, 0.010277547873556614, 0.013050505891442299, -0.0199288222938776, -0.0072767892852425575, 0.043615784496068954, -0.02225232496857643, 0.03726290538907051, 0.041873637586832047, 0.01697724126279354, 0.03294192999601364, 0.08570906519889832, 0.007753035519272089, 0.01762913167476654, 0.0014213109388947487, -0.03765150159597397, -0.015375645831227303, -0.028238827362656593, -0.04272935166954994, -0.004117276985198259, 0.013037240132689476, -0.2873590290546417, 0.03352994844317436, -0.004374750889837742, -0.0002616016427055001, -0.014996601268649101, 0.03445602208375931, 0.044863585382699966, 0.029624419286847115, -0.023045005276799202, 0.0352042093873024, 0.03671616315841675, 0.024269336834549904, 0.04324406385421753, 0.029316268861293793, 0.025751035660505295, 0.059256017208099365, 0.056218575686216354, -0.053061336278915405, 0.008481612429022789, -0.03812139481306076, 0.04676864296197891, 0.030317315831780434, 0.21750955283641815, 0.041214216500520706, -0.013380930759012699, 0.0860622450709343, -0.0180516354739666, 0.03800911828875542, 0.04438066482543945, 0.04516376182436943, -0.037533022463321686, 0.016519270837306976, 0.06788662821054459, -0.04320976138114929, 0.019230009987950325, 0.03543322533369064, -0.048948947340250015, 0.06730635464191437, 0.030518751591444016, -0.03063185326755047, -0.03746674582362175, 0.005707592237740755, -0.003428294323384762, 0.0346822626888752, 0.08049856126308441, -0.08399049192667007, -0.04495496302843094, -0.07856526970863342, 0.006138679105788469, -0.009020591154694557, -0.030641136690974236, -0.04923588037490845, -0.030260026454925537, -0.017888369038701057, 0.02564317174255848, 0.010397528298199177, 0.019116049632430077, 0.0054153213277459145, -0.05064936727285385, -0.017655737698078156, 0.04306735098361969, -0.09485021978616714, 0.019615834578871727, 0.02061421237885952, 0.007657981477677822 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
## What is Next.js? If you're not already familiar with it, Next.js is a React-based framework for building modern web applications. The framework adds a lot of powerful features — such as server-side rendering, automatic code splitting, and incremental static regeneration — that make it easy to build, scalable, and production-ready apps. . You can use a local MongoDB installation if you have one, but if you're just getting started, MongoDB Atlas is a great way to get up and running without having to install or manage your MongoDB instance. MongoDB Atlas has a forever free tier that you can sign up for as well as get the sample data that we'll be using for the rest of this tutorial. To get our MongoDB URI, in our MongoDB Atlas dashboard:
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.06650304794311523, -0.010857834480702877, 0.013117867521941662, -0.0421123281121254, 0.04913495481014252, 0.01354681421071291, -0.03373359516263008, 0.008091864176094532, 0.01712179370224476, -0.029484054073691368, 0.00486372783780098, -0.03683509677648544, 0.0025807477068156004, 0.04448055475950241, 0.007962300442159176, 0.017713306471705437, -0.02271953970193863, 0.011999054811894894, -0.05152759701013565, 0.013889109715819359, 0.03058030642569065, 0.00047716815606690943, -0.02811283804476261, -0.08128037303686142, 0.004554844927042723, 0.07395345717668533, -0.0541209913790226, -0.03223825618624687, -0.04660387709736824, -0.18477869033813477, -0.019313840195536613, -0.09106419235467911, 0.021873600780963898, -0.05120761692523956, -0.017481567338109016, -0.03827911242842674, 0.016102494671940804, 0.041220616549253464, -0.012728716246783733, 0.05788174271583557, 0.020216191187500954, 0.06377895921468735, -0.03608747199177742, -0.0756610780954361, -0.03287481144070625, -0.058180682361125946, -0.027301862835884094, -0.016346905380487442, -0.009143369272351265, -0.04799032211303711, -0.010504353791475296, -0.07229532301425934, -0.020042167976498604, -0.007170963101089001, 0.03439014405012131, 0.05996664986014366, 0.030791763216257095, 0.03747178241610527, 0.007520107552409172, 0.04301862418651581, 0.06768585741519928, 0.0025444882921874523, -0.15079249441623688, 0.10675261169672012, 0.06004055589437485, 0.06661452353000641, -0.03713395074009895, -0.03804592043161392, 0.034216322004795074, 0.037090860307216644, -0.04976740851998329, 0.01051076129078865, 0.02906768210232258, 0.05251460522413254, 0.012095428071916103, -0.0317566879093647, -0.020039672031998634, -0.05295616760849953, 0.04518790543079376, 0.007348972372710705, -0.027486527338624, -0.0665741115808487, -0.02292327769100666, 0.036880265921354294, -0.029073821380734444, -0.008280103094875813, 0.00019744184101000428, -0.04889800399541855, 0.030829736962914467, 0.04103542119264603, -0.030993932858109474, -0.042109958827495575, 0.047851305454969406, 0.03191208839416504, -0.06059493124485016, -0.01400288287550211, 0.038871873170137405, 0.012950082309544086, 0.008878111839294434, 0.25010788440704346, -0.0630970373749733, 0.05027574300765991, 0.051569677889347076, -0.019029177725315094, 0.02443532831966877, -0.022394204512238503, 0.0019047022797167301, -0.015686817467212677, 0.00043444224866107106, -0.0005573046510107815, 0.013224650174379349, -0.05802059918642044, 0.027052542194724083, -0.06333016604185104, 0.04622774198651314, -0.013011129572987556, -0.0017106003360822797, 0.037975553423166275, 0.0073649147525429726, 0.008371216244995594, 0.01924119144678116, 0.057754017412662506, 0.054349515587091446, -0.011755376122891903, 0.0477004311978817, -0.018820151686668396, 0.034153979271650314, 0.06832646578550339, 0.02425476536154747, 0.0516415573656559, 0.0387183353304863, -0.0008417449425905943, -0.0670718401670456, 0.02044978365302086, 0.02936280146241188, 0.023776091635227203, -0.02820293791592121, -0.00130402110517025, 0.01955142617225647, 0.04269833117723465, -0.01574385166168213, -0.03973045572638512, -0.03878141567111015, -0.1050112247467041, -0.06078696623444557, 0.09178207814693451, -0.03998284786939621, 0.09651115536689758, -0.07008633762598038, -0.018797509372234344, 0.008843372575938702, 0.05535914748907089, -0.07519376277923584, 0.008284427225589752, -0.01753903739154339, -0.012833915650844574, 0.03345058858394623, 0.03551553189754486, -0.0206869225949049, 0.002004832262173295, -0.05208111181855202, -0.011340719647705555, -0.013645656406879425, 0.0681174248456955, -0.0035961298272013664, -0.13721834123134613, -0.018375545740127563, 0.03723786026239395, 0.034732285887002945, -0.04310743510723114, -0.023992694914340973, 0.024929819628596306, -0.060504041612148285, -0.0060660154558718204, 0.11804331839084625, 0.0035219250712543726, -0.05748709291219711, -0.006130011286586523, -0.010534641332924366, 0.029662396758794785, 0.04447264224290848, -0.020327314734458923, -0.0605328306555748, 0.04361770302057266, -0.003331787884235382, -0.05356721952557564, -0.00902069266885519, -0.040295571088790894, 0.03874829784035683, 0.03787272050976753, -0.027880972251296043, 0.00531430309638381, -0.03256720304489136, -0.02798771858215332, 0.021001329645514488, -0.0462459996342659, -0.028457798063755035, -0.010981238447129726, 0.037073925137519836, -0.04836515337228775, 0.0968836098909378, 0.0414746031165123, -0.000985201564617455, 0.058422625064849854, -0.0098859379068017, 0.03882020711898804, -0.010496703907847404, -0.017172079533338547, 0.03379419073462486, -0.02727622352540493, -0.0542803630232811, 0.02511226013302803, 0.05941087007522583, 0.0009841074934229255, -0.0334370881319046, -0.0049512567929923534, 0.026853008195757866, 0.05952311307191849, 0.003060179064050317, 0.0513344369828701, 0.0033975415863096714, -0.06589775532484055, -0.04759255051612854, -0.2526238262653351, 0.053605467081069946, 0.015683256089687347, 0.01663288101553917, 0.01319566834717989, -0.06190325319766998, 0.025309398770332336, -0.016102038323879242, -0.009097988717257977, 0.08114150911569595, 0.08392413705587387, -0.006130915135145187, 0.03600331023335457, 0.021338021382689476, -0.033415794372558594, 0.0627908781170845, 0.08099315315485, 0.0027957747224718332, -0.024259774014353752, 0.0066417669877409935, 0.008550162427127361, -0.008369222283363342, -0.002030326286330819, -0.10406225919723511, 0.044050347059965134, 0.00024339175433851779, 0.21524742245674133, 0.050227802246809006, -0.0018699546344578266, -0.08226637542247772, 0.08115886896848679, -0.014685888774693012, -0.02025892212986946, -0.10230924934148788, 0.02620505541563034, 0.002368960529565811, 0.029307322576642036, -0.03242645785212517, -0.031102418899536133, -0.007799434941262007, -0.050233807414770126, 0.001146368682384491, 0.021763630211353302, -0.10354086756706238, -0.020767899230122566, -0.037199173122644424, -0.02440214343369007, -0.02711811289191246, -0.03664420172572136, 0.03396667540073395, 0.0024726889096200466, 0.03052419237792492, 0.03525697812438011, 0.023600609973073006, -0.033949773758649826, -0.02311212383210659, -0.0661124438047409, 0.012745245359838009, -0.04067552462220192, 0.03757087513804436, 0.007995679043233395, -0.039548832923173904, -0.009876077063381672, -0.030473502352833748, 0.05979377031326294, -0.013044232502579689, -0.0037113234866410494, -0.04093580320477486, 0.04049453139305115, -0.053330276161432266, -0.02169843204319477, 0.06445825845003128, -0.00930614024400711, 0.021910661831498146, 0.015305371955037117, 0.014740981161594391, 0.0374135784804821, 0.02341887727379799, -0.01885620690882206, 0.009953937493264675, 0.016335777938365936, -0.022622277960181236, 0.022608613595366478, 0.024369971826672554, 0.017268814146518707, 0.028547558933496475, 0.0464700423181057, -0.03366491198539734, -0.0023907923605293036, -0.02935156412422657, -0.017581984400749207, 0.007017979398369789, -0.06285238265991211, -0.0529269315302372, 0.004285312723368406, 0.01288414467126131, -0.28668221831321716, 0.032363682985305786, -0.002658254699781537, -0.0120704285800457, -0.007997873239219189, 0.028881628066301346, 0.05765954405069351, 0.026310931891202927, -0.02939516119658947, 0.041755493730306625, 0.01785385049879551, 0.041964493691921234, 0.037416595965623856, 0.003430669428780675, 0.026205044239759445, 0.05775560811161995, 0.053894929587841034, -0.02114548347890377, 0.026086723431944847, -0.03646198287606239, 0.04846438392996788, 0.02167298085987568, 0.24252034723758698, 0.022134220227599144, 0.020586155354976654, 0.08082164078950882, 0.0021283188834786415, 0.04159020259976387, 0.04453668370842934, 0.01648635044693947, -0.035712406039237976, 0.01432864647358656, 0.09294605255126953, -0.042025599628686905, 0.005172289442270994, 0.02550259418785572, -0.03613125532865524, 0.0499885119497776, 0.03171367943286896, -0.03531457856297493, -0.03716975077986717, 0.01023521926254034, -0.012981727719306946, 0.03419414535164833, 0.090863436460495, -0.07095444202423096, -0.03282299265265465, -0.07962112128734589, 0.006054646335542202, 0.02113729901611805, -0.036464136093854904, -0.05162503197789192, -0.0217281486839056, -0.0614825077354908, 0.006953030358999968, 0.04159151390194893, 0.017777394503355026, -0.01815619133412838, -0.045798223465681076, -0.006114214658737183, 0.02233480103313923, -0.07161759585142136, 0.018840836361050606, 0.016365736722946167, 0.0025773965753614902 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
To get our MongoDB URI, in our MongoDB Atlas dashboard: 1. Hit the **Connect** button. 2. Then, click the **Connect to your application** button, and here you'll see a string that contains your **URI** that will look like this: ``` mongodb+srv://:@cluster0..mongodb.net/?retryWrites=true&w=majority ``` If you are new to MongoDB Atlas, you'll need to go to the **Database Access** section and create a username and password, as well as the **Network Access** tab to ensure your IP is allowed to connect to the database. However, if you already have a database user and network access enabled, you'll just need to replace the `` and `` fields with your information. For the ``, we'll load the MongoDB Atlas sample datasets and use one of those databases. , and we'll help troubleshoot.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.061701688915491104, -0.04253983497619629, 0.014697193168103695, -0.012526524253189564, 0.0203979704529047, 0.00273298192769289, 0.03841505944728851, 0.01597476191818714, -0.0033922733273357153, -0.02007523737847805, 0.004304900765419006, -0.04132925346493721, 0.045536816120147705, 0.034793589264154434, -0.02026432193815708, 0.016391806304454803, -0.004111089278012514, 0.01745268516242504, -0.040356382727622986, 0.04153825342655182, 0.03014799766242504, -0.02450781688094139, -0.028900163248181343, -0.061353445053100586, 0.0008613208192400634, 0.05131683498620987, -0.010238858871161938, -0.06255996227264404, -0.0559014268219471, -0.2036859542131424, 0.010440168902277946, -0.0596359558403492, 0.015096818096935749, -0.0515194796025753, 0.014519620686769485, -0.03519439697265625, -0.0006116781732998788, 0.036305204033851624, -0.017349043861031532, 0.0459272600710392, 0.060404106974601746, -0.0001148820883827284, -0.007622743025422096, -0.039887141436338425, -0.032145898789167404, -0.04098663106560707, 0.005031464621424675, 0.03369174525141716, 0.08104941248893738, -0.03717714920639992, 0.0012457574484869838, -0.048771508038043976, 0.003881664713844657, -0.0013407657388597727, 0.013882789760828018, 0.03313219174742699, 0.06406059116125107, 0.042387254536151886, 0.027708645910024643, 0.013490849174559116, 0.0868503674864769, 0.050041671842336655, -0.19255651533603668, 0.09268518537282944, 0.04666818305850029, 0.04219392314553261, -0.0112817557528615, -0.01870410516858101, 0.021483123302459717, -0.024676930159330368, -0.03471881151199341, -0.007852170616388321, -0.022412976250052452, 0.06707365810871124, 0.02887636423110962, 0.016213389113545418, -0.005898820236325264, -0.05491330847144127, 0.03602747991681099, 0.04166119918227196, -0.05470522120594978, -0.011568189598619938, -0.003264304017648101, 0.0459110401570797, -0.00478704646229744, -0.03628699108958244, 0.03308746963739395, -0.021278858184814453, 0.04131511598825455, 0.0219317227602005, 0.0008094130898825824, -0.04432784020900726, 0.017919527366757393, 0.021434467285871506, -0.08818035572767258, -0.01714111864566803, 0.05025331676006317, 0.02490905299782753, 0.02474178373813629, 0.22357848286628723, -0.04409845545887947, 0.04540117084980011, 0.002208024961873889, 0.005831063259392977, 0.015782615169882774, -0.030985960736870766, 0.011074425652623177, -0.01113852672278881, -0.011699420399963856, 0.03058590367436409, -0.002235376974567771, -0.028375020250678062, 0.025636842474341393, -0.08815344423055649, 0.04591218754649162, 0.02226807177066803, -0.021764878183603287, 0.042899467051029205, -0.03591756895184517, 0.013416633941233158, -0.04031838849186897, 0.0031425845809280872, 0.045217860490083694, -0.009095384739339352, 0.05809876695275307, -0.03252631053328514, 0.052495114505290985, 0.0876951664686203, 0.025071023032069206, 0.05317379906773567, 0.038122598081827164, -0.007358067203313112, -0.08555430173873901, -0.018701549619436264, 0.019493289291858673, 0.003665274940431118, -0.017971739172935486, -0.0144491633400321, -0.02143881656229496, 0.03601042181253433, -0.020705796778202057, -0.10899883508682251, -0.020694684237241745, -0.05805661156773567, -0.02985241636633873, 0.15585795044898987, -0.08667490631341934, 0.0573633573949337, -0.05642186850309372, -0.04365868121385574, 0.02884036861360073, 0.01733267493546009, -0.0769803449511528, -0.007507286034524441, -0.024079151451587677, 0.01010004710406065, 0.04756832867860794, 0.06541905552148819, 0.0017774415900930762, -0.022550266236066818, -0.024949148297309875, -0.057604167610406876, -0.05284809321165085, 0.09537373483181, 0.030377376824617386, -0.0964834913611412, -0.01646140217781067, 0.04304502159357071, -0.0007490208372473717, -0.0205476526170969, -0.027875443920493126, 0.004990678280591965, -0.05149347335100174, 0.01967971958220005, 0.118150994181633, -0.0029874653555452824, -0.07181061804294586, -0.0189890805631876, -0.02240396849811077, 0.00889795646071434, -0.026722250506281853, -0.019307559356093407, -0.049351565539836884, 0.02771809883415699, 0.004046820569783449, -0.056112609803676605, -0.032505445182323456, -0.014739029109477997, 0.0409659706056118, 0.03159631788730621, -0.018705837428569794, 0.011594892479479313, -0.03904128819704056, 0.0021447022445499897, -0.009865266270935535, -0.05469073727726936, 0.003999732434749603, -0.03453943133354187, -0.0010724356397986412, -0.0472777783870697, 0.11242075264453888, 0.03170505166053772, -0.018917763605713844, 0.06548772752285004, -0.03305172920227051, 0.006540711037814617, -0.03984587639570236, -0.028399191796779633, 0.020046142861247063, -0.030670322477817535, -0.024030011147260666, -0.010390540584921837, 0.031733058393001556, -0.0037889103405177593, -0.023649998009204865, -0.012000908143818378, 0.03198181465268135, 0.037056319415569305, -0.01117843296378851, 0.04760171100497246, 0.03786158561706543, -0.07677572220563889, -0.08511555939912796, -0.23567606508731842, 0.045953042805194855, 0.012579813599586487, 0.0031338438857346773, 0.014380907639861107, -0.05676664412021637, 0.0031373356468975544, 0.006412955466657877, -0.016251878812909126, 0.07202798873186111, 0.07291627675294876, 0.015614059753715992, 0.009028282947838306, 0.03381067141890526, -0.018845058977603912, 0.10169200599193573, 0.0145075349137187, 0.009754924103617668, -0.02640189416706562, -0.0019367325585335493, 0.04111536964774132, -0.04477296397089958, -0.03152931109070778, -0.0629432275891304, 0.05833979696035385, 0.01158137060701847, 0.21684248745441437, 0.04757041856646538, 0.0015536635182797909, -0.0743846446275711, 0.05806916207075119, 0.009867890737950802, -0.03524318337440491, -0.11841285228729248, 0.029173612594604492, 0.02919636107981205, 0.005528009496629238, 0.017931146547198296, 0.009000277146697044, -0.03869646415114403, -0.029936986044049263, 0.015884889289736748, 0.052054185420274734, -0.08718329668045044, 0.028412198647856712, -0.04645707830786705, -0.004015518818050623, -0.026616007089614868, -0.05931568145751953, 0.009646214544773102, 0.0028193190228194, 0.054183073341846466, 0.01960683800280094, 0.01992376334965229, -0.06669922173023224, -0.017008626833558083, -0.07040046155452728, 0.004726056940853596, -0.019543997943401337, 0.0311584509909153, 0.010508965700864792, -0.029220718890428543, 0.0265896525233984, -0.05625424161553383, 0.040899768471717834, -0.0391308031976223, -0.04942227154970169, -0.0013476344756782055, 0.07006612420082092, -0.025255655869841576, -0.01335860788822174, 0.0447985865175724, -0.0038781899493187666, 0.05708727613091469, 0.029665648937225342, 0.013017074204981327, 0.043581824749708176, -0.0237469132989645, -0.003388224635273218, -0.048256248235702515, 0.016909310594201088, -0.060444269329309464, 0.04207434505224228, 0.02159607782959938, 0.04104423522949219, 0.06005926430225372, 0.04743501543998718, -0.012227412313222885, 0.02353835478425026, -0.0008353412267751992, 0.0004385094507597387, -0.04072568938136101, -0.0013147545978426933, -0.06750334054231644, -0.02045014128088951, 0.007402018643915653, -0.2687097489833832, 0.04180360212922096, -0.014592976309359074, 0.052871424704790115, -0.005610508844256401, 0.020236322656273842, 0.08862192183732986, 0.014470525085926056, -0.06003672257065773, 0.022834016010165215, 0.0871211364865303, 0.0263987984508276, 0.0077202501706779, -0.01186596229672432, -0.009487198665738106, 0.09305110573768616, 0.03145410493016243, -0.00509305065497756, 0.019890079274773598, -0.027465522289276123, 0.02297135815024376, 0.048231322318315506, 0.22668598592281342, 0.03351134434342384, 0.03509728983044624, 0.05054285004734993, -0.011659402400255203, 0.014315505512058735, 0.03189105913043022, 0.01112528145313263, -0.026070743799209595, -0.03516974300146103, 0.05339021608233452, -0.017655285075306892, 0.061385802924633026, 0.017802342772483826, -0.021833093836903572, 0.015014554373919964, 0.031081102788448334, -0.04299295321106911, -0.06103203445672989, 0.03203578293323517, -0.06175733730196953, 0.024690082296729088, 0.10034598410129547, -0.04747413098812103, -0.03281158208847046, -0.06302768737077713, 0.008227900601923466, 0.04127771407365799, -0.04465444013476372, -0.059283509850502014, -0.026588445529341698, 0.007167262025177479, 0.011082443408668041, 0.06915172934532166, -0.01743556745350361, -0.004129494074732065, -0.043065350502729416, -0.018573511391878128, -0.0026502208784222603, -0.09230075776576996, 0.015207520686089993, 0.0014129008632153273, -0.021626070141792297 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
For the ``, we'll load the MongoDB Atlas sample datasets and use one of those databases. , and we'll help troubleshoot. ## Querying MongoDB with Next.js Now that we are connected to MongoDB, let's discuss how we can query our MongoDB data and bring it into our Next.js application. Next.js supports multiple ways to get data. We can create API endpoints, get data by running server-side rendered functions for a particular page, and even generate static pages by getting our data at build time. We'll look at all three examples. ## Example 1: Next.js API endpoint with MongoDB The first example we'll look at is building and exposing an API endpoint in our Next.js application. To create a new API endpoint route, we will first need to create an `api` directory in our `pages` directory, and then every file we create in this `api` directory will be treated as an individual API endpoint.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.05682733282446861, -0.002558856038376689, 0.026809358969330788, -0.054368164390325546, 0.03055047243833542, -0.002027659211307764, -0.00936425756663084, -0.0025921454653143883, -0.013027796521782875, -0.04335874319076538, 0.007278938312083483, -0.033978935331106186, 0.0004032631404697895, 0.034531835466623306, -0.004568788222968578, 0.010617527179419994, -0.017081184312701225, -0.011356576345860958, -0.05890212580561638, 0.026502028107643127, 0.007449837867170572, 0.0010096522746607661, -0.008151221089065075, -0.06986905634403229, -0.036521065980196, 0.059201471507549286, -0.03368325158953667, -0.041369274258613586, -0.04691998288035393, -0.19038026034832, 0.0015540323220193386, -0.09043127298355103, 0.004325236193835735, -0.06144910305738449, -0.031125718727707863, -0.022704947739839554, 0.027743780985474586, 0.028027966618537903, -0.0059862444177269936, 0.05089236795902252, 0.07171929627656937, 0.017530718818306923, -0.04294730722904205, -0.07719237357378006, -0.019949404522776604, -0.04032012075185776, -0.008756599389016628, -0.009443662129342556, -0.01038090605288744, -0.05732669308781624, -0.019710572436451912, -0.06830377131700516, 0.013292483985424042, -0.024473153054714203, 0.028847472742199898, 0.06912253797054291, 0.03701958805322647, 0.04338638857007027, 0.006540263071656227, 0.03413620963692665, 0.07200965285301208, 0.007422270253300667, -0.1514969766139984, 0.08260782808065414, 0.0285926703363657, 0.06795297563076019, -0.03641536831855774, -0.008901317603886127, 0.027781857177615166, 0.028448238968849182, -0.04053385928273201, -0.009419095702469349, 0.031924378126859665, 0.0682198777794838, 0.022965846583247185, -0.027621472254395485, -0.008501408621668816, -0.03697995841503143, 0.026845023036003113, 0.0024218587204813957, -0.04477158188819885, -0.07586522400379181, -0.005756378639489412, 0.045403625816106796, -0.026175089180469513, -0.024047767743468285, -0.010083242319524288, -0.03056817688047886, 0.029578659683465958, 0.04021146893501282, -0.01676418073475361, -0.047009699046611786, 0.024789324030280113, 0.05126144364476204, -0.06492118537425995, -0.012704230844974518, 0.05052919313311577, 0.014087680727243423, 0.018415436148643494, 0.2212252914905548, -0.06459227204322815, 0.048563119024038315, 0.05741320922970772, -0.01833759993314743, -0.008367594331502914, -0.04124880209565163, -0.014036779291927814, -0.020462404936552048, -0.0022153451573103666, 0.024903545156121254, 0.012895138002932072, -0.04806118085980415, 0.005797102581709623, -0.06360900402069092, 0.03171687200665474, -0.016236506402492523, -0.015081679448485374, 0.04579146206378937, -0.037458017468452454, -0.006770732346922159, 0.009603680111467838, 0.035171009600162506, 0.04434651508927345, 0.0038530807942152023, 0.04705504700541496, -0.023208776488900185, 0.066070556640625, 0.06330195814371109, 0.017179161310195923, 0.03794974461197853, 0.05695469304919243, 0.0012980024330317974, -0.0989747941493988, -0.0008744948427192867, 0.004522684495896101, 0.02474467270076275, -0.004958841949701309, 0.008039732463657856, 0.02659367211163044, 0.04438994824886322, -0.011178303509950638, -0.060137566179037094, -0.03372657299041748, -0.10389122366905212, -0.049809232354164124, 0.11692972481250763, -0.03273138776421547, 0.10050047934055328, -0.052578456699848175, -0.06962278485298157, 0.01253625936806202, 0.05547370761632919, -0.06713662296533585, 0.007697428576648235, -0.03728259727358818, 0.01621093600988388, 0.03169754147529602, 0.03910889849066734, -0.012331928126513958, -0.011866854503750801, -0.03959859162569046, -0.004057318903505802, -0.012733266688883305, 0.08991920948028564, -0.004380835220217705, -0.10912919044494629, 0.0037064957432448864, 0.024451149627566338, 0.0064012883231043816, -0.03494252637028694, -0.012980736792087555, 0.029870374128222466, -0.03931287303566933, -0.005474462173879147, 0.10262015461921692, 0.020941557362675667, -0.07102376222610474, 0.002662388142198324, -0.01887676678597927, 0.024032624438405037, 0.0030181282199919224, -0.024582983925938606, -0.03981001302599907, 0.024597816169261932, 0.0031801851000636816, -0.05478757247328758, 0.007232279516756535, -0.029474547132849693, 0.026484787464141846, 0.016165804117918015, -0.022921960800886154, -0.008039073087275028, -0.01945047453045845, -0.012516520917415619, -0.0010392341064289212, -0.053848713636398315, -0.004602983593940735, 0.0016207547159865499, 0.02125248685479164, -0.060439206659793854, 0.10048215836286545, 0.04937993362545967, 0.0006164783844724298, 0.07946784794330597, -0.02810952253639698, 0.030855689197778702, -0.020296476781368256, -0.006976817734539509, 0.03849681839346886, -0.019728807732462883, -0.05916202440857887, -0.001339493552222848, 0.055288609117269516, -0.0016392066609114408, -0.028815174475312233, -0.010028739459812641, 0.015037314034998417, 0.036226969212293625, 0.00031814846443012357, 0.060622867196798325, -0.00045118099660612643, -0.05763515457510948, -0.031185707077383995, -0.2572932541370392, 0.02758968435227871, 0.010397740639746189, 0.028580909594893456, 0.014799048192799091, -0.07545912265777588, 0.01992228254675865, 0.007285209838300943, -0.05836434289813042, 0.08472637087106705, 0.11170890927314758, 0.006825554650276899, 0.03777085244655609, 0.023162702098488808, -0.02600191906094551, 0.0674881637096405, 0.06457710266113281, -0.016520049422979355, -0.03411485627293587, -0.0017462390242144465, 0.020074475556612015, -0.026273395866155624, 0.0056209987960755825, -0.11145938187837601, 0.02995624952018261, 0.0135287931188941, 0.22684532403945923, 0.04048763960599899, 0.006544907111674547, -0.08414583653211594, 0.08584347367286682, -0.02789563126862049, -0.024751197546720505, -0.1063576266169548, 0.016979962587356567, -0.0008739015320315957, 0.02791776694357395, -0.00982757844030857, 0.0033166026696562767, -0.024213502183556557, -0.03395741432905197, 0.01122813019901514, 0.0364028699696064, -0.07714194804430008, -0.012562376447021961, -0.025737600401043892, -0.023490196093916893, -0.026140743866562843, -0.04350421205163002, 0.03621736168861389, -0.015379711054265499, 0.0294305682182312, 0.03874891251325607, 0.008337571285665035, -0.042495761066675186, -0.008443625643849373, -0.05007600039243698, -0.001361589296720922, -0.029490528628230095, 0.06461659073829651, -0.007107505574822426, -0.02690221555531025, 0.020797178149223328, -0.03899932652711868, 0.0555339939892292, -0.005013363901525736, -0.01591373234987259, -0.04406856372952461, 0.04931925982236862, -0.03985467925667763, -0.02425839751958847, 0.07983992993831635, -0.018221095204353333, 0.051566366106271744, 0.021330304443836212, 0.03977915272116661, 0.029115259647369385, -0.015013192780315876, -0.017954401671886444, -0.00042946418398059905, 0.021788010373711586, -0.02170657552778721, 0.01864464581012726, 0.009055089205503464, 0.032002367079257965, 0.03494018316268921, 0.03588981181383133, -0.013583173975348473, 0.015801675617694855, -0.03424215316772461, -0.013432839885354042, -0.008516853675246239, -0.05740627646446228, -0.07021284848451614, 0.017671551555395126, 0.029274392873048782, -0.27648279070854187, 0.01803002692759037, 0.009541414678096771, 0.016344403848052025, -0.026336193084716797, 0.012668954208493233, 0.04024786874651909, 0.027460791170597076, -0.021043909713625908, 0.050539109855890274, 0.053987618535757065, 0.04227474331855774, 0.026581037789583206, 0.004257660359144211, 0.02522842213511467, 0.08446502685546875, 0.05409092456102371, -0.02283654361963272, 0.04230150207877159, -0.02773929387331009, 0.0651644691824913, 0.03697480261325836, 0.25427475571632385, 0.01851159706711769, 0.002205688739195466, 0.0871228352189064, -0.014380894601345062, 0.07049041986465454, 0.03075614757835865, 0.02241107076406479, -0.0016204258427023888, 0.0004530651494860649, 0.09220828115940094, -0.04075881838798523, 0.040140263736248016, 0.03621799871325493, -0.03110782615840435, 0.046667732298374176, 0.045699696987867355, -0.038491323590278625, -0.024018073454499245, 0.009121976792812347, -0.008862496353685856, 0.01943473517894745, 0.10206920653581619, -0.04572708159685135, -0.04795557260513306, -0.08091481775045395, 0.021837225183844566, 0.01812230981886387, -0.06334945559501648, -0.08515700697898865, -0.02265266701579094, -0.028968561440706253, 0.0047001964412629604, 0.036651041358709335, 0.00011721071496140212, -0.002149458508938551, -0.04041087254881859, -0.003117137122899294, 0.026603158563375473, -0.08727893233299255, -0.014111697673797607, -0.0025772545486688614, 0.0008255249704234302 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
Let's go ahead and create the `api` directory and a new file in this `directory` called `movies.tsx`. This endpoint will return a list of 20 movies from our MongoDB database. The implementation for this route is as follows: ``` import clientPromise from "../../lib/mongodb"; import { NextApiRequest, NextApiResponse } from 'next'; export default async (req: NextApiRequest, res: NextApiResponse) => { try { const client = await clientPromise; const db = client.db("sample_mflix"); const movies = await db .collection("movies") .find({}) .sort({ metacritic: -1 }) .limit(10) .toArray(); res.json(movies); } catch (e) { console.error(e); } } ```
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.08413121849298477, -0.013491722755134106, 0.03753519058227539, -0.04501663148403168, 0.03524985536932945, -0.005136992782354355, 0.010879690758883953, -0.005656496621668339, 0.027962325140833855, -0.009257509373128414, 0.031008178368210793, -0.037337254732847214, 0.01085659209638834, 0.03780133277177811, -0.01919415406882763, 0.007371710147708654, 0.008834511041641235, -0.01788824237883091, -0.057810768485069275, 0.020454201847314835, 0.025790203362703323, -0.013016684912145138, -0.01834546960890293, -0.07328879833221436, -0.005527527071535587, 0.04593295976519585, -0.019945938140153885, -0.026836946606636047, -0.02856048382818699, -0.20896445214748383, -0.027848703786730766, -0.08829007297754288, 0.007664592005312443, -0.03454278036952019, -0.026544762775301933, -0.05083789303898811, 0.011583267711102962, 0.020138170570135117, -0.02330709807574749, 0.04083878919482231, 0.04192882031202316, 0.031073372811079025, -0.034731365740299225, -0.09655025601387024, -0.02471819519996643, -0.05711774155497551, -0.05258672684431076, 0.016513444483280182, 0.012253795750439167, -0.043755222111940384, -0.03749079257249832, -0.06133253872394562, 0.013555608689785004, 0.0031139091588556767, 0.019265014678239822, 0.048671308904886246, 0.0013523376546800137, 0.046637795865535736, 0.03303638473153114, 0.04703434556722641, 0.08238000422716141, -0.0033189402893185616, -0.1497403085231781, 0.06887473165988922, 0.04571758955717087, 0.050368912518024445, -0.05488190799951553, -0.023526346310973167, 0.01050182431936264, 0.0060718487948179245, -0.029708726331591606, 0.014380504377186298, 0.03510092571377754, 0.0978984460234642, 0.006581963039934635, -0.055336493998765945, 0.025822501629590988, -0.013621311634778976, 0.03109735995531082, 0.014099599793553352, -0.02837430313229561, -0.07075021415948868, -0.0016648053424432874, 0.028034381568431854, 0.000698511372320354, -0.050790634006261826, 0.015907082706689835, 0.0002545242023188621, 0.0449378527700901, 0.013646423816680908, 0.013614419847726822, 0.0025674884673208, 0.004494654014706612, 0.053397297859191895, -0.09888378530740738, 0.009927254170179367, 0.04135838896036148, 0.04088321328163147, -0.008459925651550293, 0.19437314569950104, -0.01700999215245247, 0.03399095684289932, 0.035877376794815063, -0.006263443734496832, -0.028398681432008743, -0.034079600125551224, -0.0229504257440567, -0.021362842991948128, -0.0036134938709437847, 0.014329474419355392, 0.010559041053056717, -0.04456907883286476, 0.022100115194916725, -0.07017698138952255, 0.019877562299370766, 0.037680234760046005, -0.019128834828734398, 0.03713023290038109, -0.0436745248734951, 0.01334789302200079, 0.014803795143961906, 0.007603581063449383, 0.026363590732216835, -0.018006429076194763, -0.0008012629114091396, -0.011179810389876366, 0.07653571665287018, 0.08505470305681229, 0.032660532742738724, 0.057890210300683975, 0.03771638125181198, 0.03791499510407448, -0.07918369024991989, -0.01958518847823143, 0.028231674805283546, 0.037044163793325424, -0.003710513236001134, -0.022996850311756134, 0.0250381026417017, 0.004761636722832918, 0.027191251516342163, -0.08572561293840408, -0.04842294007539749, -0.09648942947387695, -0.03116251900792122, 0.1293446123600006, -0.0065193441696465015, 0.069471575319767, -0.03130921721458435, -0.024085260927677155, 0.01272623147815466, 0.03314099460840225, -0.08172494918107986, -0.040590111166238785, -0.02755403146147728, -0.010845474898815155, 0.05351775512099266, 0.044057827442884445, -0.0322377048432827, 0.017890598624944687, -0.03472040221095085, 0.0014258595183491707, 0.01104942336678505, 0.06791044026613235, 0.0039108749479055405, -0.053236689418554306, -0.00220840098336339, 0.026339590549468994, -0.011269919574260712, -0.05158006399869919, -0.017850130796432495, 0.012046177871525288, -0.04729475826025009, -0.0065284171141684055, 0.06691204011440277, 0.0126573471352458, -0.05998588725924492, -0.006358992774039507, -0.003262894693762064, 0.0014873043401166797, -0.009979691356420517, -0.025004776194691658, -0.039841458201408386, 0.035503238439559937, 0.04133933410048485, -0.017456138506531715, 0.005461027845740318, -0.04033106938004494, 0.05588807165622711, 0.018208347260951996, -0.04207278788089752, -0.01836015097796917, 0.017344549298286438, -0.042602844536304474, -0.03368236869573593, -0.050090935081243515, -0.014239716343581676, -0.0077127632685005665, 0.0365881472826004, -0.00503123365342617, 0.12488598376512527, 0.011472983285784721, -0.014143559150397778, 0.07378993183374405, -0.029230650514364243, 0.033035509288311005, -0.03100593201816082, -0.018171798437833786, 0.03133664280176163, -0.01165098324418068, -0.08124426007270813, -0.004392102360725403, 0.07199837267398834, 0.0311959907412529, -0.020697401836514473, -0.029708299785852432, 0.03647444024682045, 0.03163576498627663, 0.055568818002939224, 0.021617956459522247, 0.027367256581783295, -0.07960814237594604, -0.04497619345784187, -0.25720688700675964, 0.043515849858522415, -0.02944682352244854, -0.015754764899611473, 0.014429484494030476, -0.05902204290032387, -0.008277319371700287, 0.014692127704620361, -0.05447256192564964, 0.0720207691192627, 0.1075374186038971, -0.009442866779863834, 0.029587628319859505, 0.025093864649534225, -0.031566593796014786, 0.01743302121758461, 0.0012289838632568717, -0.013830014504492283, -0.013079451397061348, 0.01698586903512478, -0.02146383933722973, -0.03536539897322655, -0.025327010080218315, -0.08384604752063751, -0.005480804480612278, 0.006507773417979479, 0.24731457233428955, 0.05401643365621567, 0.0006334448698908091, -0.04737911373376846, 0.0897582471370697, 0.01235416904091835, -0.01559370569884777, -0.07670557498931885, 0.0020749398972839117, 0.0002623113105073571, 0.029691841453313828, 0.005348925944417715, 0.033386800438165665, -0.014455433003604412, -0.017429113388061523, 0.022860640659928322, 0.017844878137111664, -0.046050943434238434, -0.017061030492186546, -0.032064080238342285, -0.07008868455886841, 0.0223199762403965, -0.014583158306777477, 0.02285325713455677, 0.013473935425281525, 0.01545439101755619, 0.04954320192337036, 0.008321544155478477, -0.01774762198328972, -0.010636243969202042, -0.004163229838013649, 0.0026905315462499857, -0.0022036319132894278, 0.05413676053285599, -0.02694081887602806, -0.028135180473327637, 0.019020244479179382, -0.0068656220100820065, 0.05700824782252312, -0.014470591209828854, 0.015133603475987911, -0.02025679126381874, 0.0404655784368515, -0.04593466967344284, -0.016694476827979088, 0.07997091114521027, -0.03357580304145813, 0.04230779409408569, 0.02958627976477146, 0.0606834851205349, 0.021052811294794083, -0.02043566294014454, -0.03143787384033203, 0.0015798466047272086, 0.03853512927889824, -0.028242649510502815, 0.008068361319601536, -0.00766350282356143, 0.019907375797629356, 0.005792274139821529, 0.035802122205495834, 0.0015618231846019626, 0.004296262748539448, 0.008915933780372143, 0.02511371299624443, -0.0032130752224475145, -0.04728027805685997, -0.03071301057934761, 0.018399007618427277, 0.009779037907719612, -0.313294917345047, 0.012776653282344341, 0.0005258228629827499, -0.01102065946906805, -0.019119389355182648, 0.06938879191875458, 0.03133261203765869, 0.029172398149967194, -0.020332753658294678, 0.02827868051826954, 0.0052953013218939304, 0.05533342435956001, 0.04457464441657066, 0.013019965030252934, 0.013875518925487995, 0.05163811147212982, 0.039662424474954605, -0.020528210327029228, 0.08155898004770279, -0.02896963804960251, 0.02265663631260395, 0.03915916383266449, 0.251458078622818, -0.020979681983590126, -0.0000670495064696297, 0.06476183235645294, -0.03233570232987404, 0.06022224575281143, 0.05669495835900307, -0.019209496676921844, 0.005034237634390593, -0.00902591086924076, 0.07856671512126923, -0.03976679593324661, 0.07274360209703445, -0.0019758157432079315, -0.027111252769827843, 0.052548110485076904, 0.04883960261940956, -0.03242196887731552, -0.06227772682905197, -0.014278044924139977, 0.013482876121997833, -0.028808746486902237, 0.11143280565738678, -0.06793471425771713, -0.07792025059461594, -0.09444332122802734, -0.013835134916007519, 0.03218894824385643, -0.0977061539888382, -0.06356599181890488, 0.00493583083152771, -0.01349635235965252, 0.042574748396873474, 0.006453951820731163, -0.006169564090669155, -0.024565914645791054, -0.07460740208625793, -0.02408718131482601, 0.05648157745599747, -0.09649548679590225, 0.007744316011667252, 0.033244788646698, 0.026168879121541977 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
To explain what is going on here, we'll start with the import statement. We are importing our `clientPromise` method from the `lib/mongodb` file. This file contains all the instructions on how to connect to our MongoDB Atlas cluster. Additionally, within this file, we cache the instance of our connection so that subsequent requests do not have to reconnect to the cluster. They can use the existing connection. All of this is handled for you! Next, our API route handler has the signature of `export default async (req, res)`. If you're familiar with Express.js, this should look very familiar. This is the function that gets run when the `localhost:3000/api/movies` route is called. We capture the request via `req` and return the response via the `res` object.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.04080770164728165, -0.014187704771757126, 0.007827481254935265, -0.005622378084808588, 0.030692078173160553, -0.02683299221098423, 0.0438162125647068, -0.008875356987118721, 0.006549777928739786, -0.01643410325050354, 0.03642597794532776, -0.058663949370384216, -0.021883724257349968, 0.02552318386733532, -0.018908601254224777, 0.03326756879687309, -0.0015534850535914302, -0.06942133605480194, -0.03607608750462532, 0.04501299560070038, 0.013623839244246483, -0.018397143110632896, -0.035987403243780136, -0.04392740875482559, 0.017704704776406288, 0.04212244227528572, -0.01571025140583515, -0.017367513850331306, -0.028268937021493912, -0.21934330463409424, -0.0124101797118783, -0.0881354883313179, -0.036015357822179794, -0.0451052188873291, 0.00781275611370802, -0.02403954602777958, 0.027155311778187752, 0.03319169208407402, -0.014270405285060406, 0.040268752723932266, 0.05085150524973869, 0.006940371822565794, -0.01634206995368004, -0.10383309423923492, -0.017246883362531662, -0.0423705130815506, 0.001291251159273088, 0.005323822144418955, 0.014614466577768326, -0.04911801591515541, -0.010937643237411976, -0.043338343501091, 0.0091739222407341, -0.01884101703763008, 0.023685438558459282, 0.07058828324079514, 0.04455428943037987, 0.04447541758418083, 0.044667523354291916, 0.07126320153474808, 0.06398751586675644, 0.012404154986143112, -0.18239261209964752, 0.08148826658725739, 0.06192066892981529, 0.05417795479297638, -0.04971178621053696, -0.020525015890598297, 0.010235088877379894, 0.0051667052321136, -0.06123735383152962, 0.008202376775443554, 0.005233790259808302, 0.07980258017778397, 0.026875901967287064, -0.03408697247505188, -0.009520186111330986, -0.01609892025589943, 0.04310411214828491, 0.03167620301246643, -0.01016269437968731, -0.07316219806671143, -0.03490152582526207, 0.04138631373643875, -0.0008134213858284056, -0.04015986993908882, 0.015190928243100643, -0.03295600786805153, 0.040201835334300995, -0.006665294524282217, -0.04733024910092354, -0.04802585020661354, -0.009972338564693928, 0.05801132693886757, -0.11976278573274612, 0.01186436228454113, 0.04124393314123154, 0.040114037692546844, -0.023938149213790894, 0.2254716157913208, -0.024731352925300598, 0.04704749584197998, 0.04870902746915817, 0.020247818902134895, -0.027368564158678055, -0.05676552653312683, -0.033416248857975006, -0.03155277669429779, 0.002102379221469164, 0.0202961266040802, -0.018993759527802467, -0.016911234706640244, 0.0021749562583863735, -0.04833969846367836, 0.03159395605325699, 0.045394789427518845, -0.02947380021214485, 0.015554702840745449, -0.041726380586624146, 0.0038500227965414524, 0.007521467283368111, 0.024155674502253532, 0.04965247958898544, -0.020419958978891373, 0.020740890875458717, 0.002932523377239704, 0.04200951009988785, 0.07766085863113403, 0.008295145817101002, 0.04988820105791092, 0.021162642166018486, 0.038082726299762726, -0.05943236127495766, 0.021666718646883965, 0.01904050074517727, 0.023356882855296135, 0.0011533043580129743, -0.0012882078299298882, 0.01106802187860012, 0.026156894862651825, -0.002838284708559513, -0.08119989186525345, -0.05271613970398903, -0.08176936954259872, -0.023219633847475052, 0.08980319648981094, -0.010895821265876293, 0.07844524830579758, -0.04327958822250366, -0.013557731173932552, -0.005431311205029488, 0.01714431308209896, -0.09218361228704453, -0.009254706092178822, -0.015174188651144505, -0.0011953613720834255, 0.014556611888110638, 0.06007811054587364, -0.04766682907938957, -0.02654602751135826, -0.015317565761506557, -0.006646219175308943, -0.004893024917691946, 0.05216249078512192, 0.05681333690881729, -0.06041611731052399, -0.00637781759724021, -0.006285177543759346, 0.008037783205509186, -0.03390052914619446, -0.05542294681072235, 0.007235206197947264, -0.04335722327232361, -0.008258798159658909, 0.0837276503443718, 0.015751902014017105, -0.044438090175390244, -0.01083634328097105, -0.014014783315360546, -0.00004959266516380012, 0.009534956887364388, -0.01783888228237629, -0.044288281351327896, 0.020753728225827217, 0.03742201253771782, -0.0430755577981472, -0.02084280177950859, -0.02315167523920536, 0.04802992194890976, 0.017186379060149193, -0.041609689593315125, -0.02195013500750065, 0.01858373172581196, -0.04204457998275757, -0.009098750539124012, -0.005754540208727121, -0.020899305120110512, -0.02683665044605732, 0.022514833137392998, -0.01225114893168211, 0.15248338878154755, 0.05124860256910324, 0.002659025602042675, 0.06312436610460281, -0.030122030526399612, 0.052531905472278595, -0.03116469457745552, -0.0068167103454470634, 0.01941300742328167, 0.009326566010713577, -0.07620341330766678, 0.009103857912123203, 0.04349644482135773, 0.004408335313200951, -0.009164916351437569, -0.002107923151925206, 0.03592870011925697, 0.056488264352083206, 0.04413815587759018, 0.0192304328083992, 0.037568122148513794, -0.03708556666970253, -0.02569117583334446, -0.23576487600803375, 0.07888863980770111, -0.012568529695272446, -0.027003146708011627, -0.0023470944724977016, -0.05048263445496559, 0.001979964319616556, 0.010532022453844547, -0.008871912956237793, 0.06602184474468231, 0.08783366531133652, 0.035908207297325134, 0.022193053737282753, 0.02811308577656746, -0.009667705744504929, 0.04156375303864479, 0.0032152640633285046, 0.0016088333213701844, -0.053979773074388504, 0.009050874970853329, -0.02872585691511631, -0.031080804765224457, -0.057367488741874695, -0.07248387485742569, 0.0027462681755423546, 0.011510276235640049, 0.2230393886566162, 0.05636674910783768, -0.003928813152015209, -0.07319250702857971, 0.07030294835567474, 0.04766009747982025, -0.007027384825050831, -0.11612187325954437, 0.017986061051487923, -0.010504805482923985, 0.050667643547058105, 0.002252519829198718, 0.0449860654771328, 0.00023164220328908414, -0.02307455614209175, 0.04135787487030029, 0.023109817877411842, -0.06089843809604645, 0.00410907668992877, -0.006349506322294474, -0.045319125056266785, 0.0013013858115300536, -0.07744710892438889, 0.030366118997335434, 0.0032010155264288187, 0.022953230887651443, 0.03897972032427788, -0.004195072688162327, -0.0299739520996809, -0.010646314360201359, -0.00922110304236412, 0.008131434209644794, -0.026159990578889847, 0.06215929239988327, -0.0006661268998868763, -0.012141278944909573, 0.019815195351839066, -0.03759148344397545, 0.08919941633939743, -0.0022559373173862696, 0.02355477586388588, -0.036650631576776505, 0.05289405584335327, -0.02483735792338848, -0.029246559366583824, 0.07845225930213928, -0.036624059081077576, 0.023747436702251434, 0.030989857390522957, 0.06462742388248444, 0.01410020049661398, -0.018719224259257317, -0.0267326757311821, 0.008126568049192429, 0.06505423784255981, -0.03944600000977516, 0.015939831733703613, 0.03084007278084755, 0.032750826328992844, 0.03176012262701988, -0.015116863884031773, 0.00034973880974575877, 0.007712776307016611, -0.007218102924525738, 0.013657186180353165, -0.03178763762116432, -0.019553331658244133, -0.08324025571346283, 0.02658296748995781, -0.015660598874092102, -0.29590123891830444, 0.008731896989047527, -0.014338529668748379, -0.030717918649315834, -0.024368511512875557, 0.03464852645993233, 0.022048654034733772, 0.05715597793459892, -0.05950843170285225, 0.027222422882914543, 0.02682749181985855, 0.020785482600331306, 0.04829954728484154, 0.028127385303378105, 0.004230082500725985, 0.0670536607503891, 0.029394451528787613, -0.04560823738574982, 0.05186161398887634, -0.06854431331157684, 0.0020644739270210266, 0.04481888189911842, 0.23354622721672058, 0.015078452415764332, 0.048419877886772156, 0.047806307673454285, -0.03169923648238182, 0.0678437277674675, 0.06356579810380936, -0.013692229054868221, -0.010827409103512764, 0.003904797602444887, 0.07530757039785385, -0.0060331132262945175, 0.054398275911808014, -0.028905736282467842, -0.027489054948091507, 0.030317317694425583, 0.062251318246126175, -0.0326823852956295, -0.041720058768987656, -0.02872653678059578, 0.021266357973217964, -0.009850154630839825, 0.08385832607746124, -0.07016782462596893, -0.048277419060468674, -0.10212250798940659, 0.001319231349043548, 0.016946088522672653, -0.09898419678211212, -0.07918818295001984, 0.012362902984023094, -0.016772298142313957, 0.02208947390317917, 0.020225344225764275, -0.034397050738334656, -0.032254207879304886, -0.07433236390352249, -0.00154586392454803, 0.044860776513814926, -0.09672413766384125, 0.004058306571096182, 0.04345598816871643, -0.004330209456384182 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
Our handler function implementation calls the `clientPromise` function to get the instance of our MongoDB database. Next, we run a MongoDB query using the MongoDB Node.js driver to get the top 20 movies out of our **movies** collection based on their **metacritic** rating sorted in descending order. Finally, we call the `res.json` method and pass in our array of movies. This serves our movies in JSON format to our browser. If we navigate to `localhost:3000/api/movies`, we'll see a result that looks like this:
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.03949460759758949, -0.005377274937927723, 0.00629689684137702, -0.02052428387105465, 0.0445094034075737, -0.00857863761484623, 0.03903236985206604, -0.0029697122517973185, 0.03043171763420105, -0.008273706771433353, 0.028260083869099617, -0.02497355453670025, 0.005518490914255381, 0.034866705536842346, -0.008512506261467934, -0.0020497385412454605, 0.01238667219877243, -0.016903312876820564, -0.047465164214372635, 0.027830414474010468, 0.029882173985242844, -0.001725057139992714, -0.02939775213599205, -0.06646186858415604, 0.008993548341095448, 0.05255510285496712, -0.0066858213394880295, -0.022541819140315056, -0.038622286170721054, -0.19451098144054413, -0.026328539475798607, -0.09860503673553467, -0.007912913337349892, -0.03468030318617821, 0.013927535153925419, -0.049083296209573746, -0.0015362122794613242, 0.03920793905854225, -0.012036135420203209, 0.04840044677257538, 0.04776052013039589, 0.02034904807806015, -0.02824920043349266, -0.11772201955318451, -0.03936279937624931, -0.034298624843358994, -0.014271806925535202, 0.0031426299829035997, 0.0037827719934284687, -0.033062513917684555, -0.01509554497897625, -0.03955052047967911, -0.01831599697470665, 0.007632668130099773, 0.02953323721885681, 0.03659028932452202, 0.003436734899878502, 0.040397513657808304, 0.03373774141073227, 0.053476732224226, 0.04582708328962326, 0.0036584751214832067, -0.1355798840522766, 0.09001044929027557, 0.046846598386764526, 0.05057761073112488, -0.06201522424817085, -0.02401094138622284, -0.0032919449731707573, 0.020759103819727898, -0.012069656513631344, 0.02247627265751362, 0.02193630486726761, 0.06673017144203186, 0.02458701655268669, -0.0534454807639122, -0.004067983012646437, -0.022703303024172783, 0.03223120793700218, 0.02987716719508171, -0.010207736864686012, -0.06887540221214294, -0.044851209968328476, 0.00593652343377471, 0.015555378049612045, -0.03978010639548302, 0.03363367170095444, -0.006795602384954691, 0.04350708797574043, -0.0024832452181726694, -0.024855399504303932, -0.015118202194571495, -0.01954401284456253, 0.031404655426740646, -0.11121965944766998, 0.010673529468476772, 0.03893318027257919, 0.05155297741293907, -0.010609697550535202, 0.21996191143989563, -0.01436472125351429, 0.04361915960907936, 0.04748663678765297, -0.012539006769657135, -0.01284266822040081, -0.047116976231336594, -0.011203626170754433, -0.017942411825060844, 0.003895500209182501, 0.0474199578166008, -0.019797371700406075, -0.02488713711500168, 0.0072904047556221485, -0.05948555842041969, 0.039229828864336014, 0.024465881288051605, -0.018644802272319794, 0.051096633076667786, -0.025624029338359833, -0.017645172774791718, 0.015101896598935127, 0.05358186736702919, 0.021722063422203064, -0.04745323210954666, 0.025301875546574593, -0.028974367305636406, 0.05469530075788498, 0.11085883527994156, 0.017632583156228065, 0.03797308728098869, 0.012891978025436401, -0.00922059640288353, -0.07786539196968079, 0.010582906194031239, 0.0018962385365739465, 0.026246143504977226, 0.002737798960879445, -0.0000809847770142369, 0.03853663057088852, 0.013803328387439251, 0.017531506717205048, -0.09990590065717697, -0.05765169858932495, -0.07317696511745453, -0.04494641348719597, 0.11363241076469421, -0.020471569150686264, 0.10188866406679153, -0.05017225071787834, -0.03655914589762688, -0.0020149769261479378, 0.05653839185833931, -0.09337574988603592, -0.04093895107507706, -0.03934408724308014, -0.0074788411147892475, 0.02181144244968891, 0.03856916353106499, -0.03944934532046318, 0.0001184114589705132, -0.04386179521679878, -0.0014528484316542745, 0.005386060103774071, 0.04013792425394058, 0.044452447444200516, -0.05672633647918701, 0.009639760479331017, 0.03290683031082153, 0.004199101589620113, -0.03175501897931099, -0.035276152193546295, 0.00815901905298233, -0.07359068095684052, 0.00035699535510502756, 0.07771730422973633, 0.022370195016264915, -0.053076453506946564, -0.0033625937066972256, 0.019403453916311264, -0.011895542964339256, -0.002184160053730011, -0.009829126298427582, -0.0412147156894207, 0.04290708154439926, 0.03372335806488991, -0.03413419798016548, 0.0012038674904033542, -0.04065416380763054, 0.05158690735697746, -0.006711997557431459, -0.0386069193482399, -0.07021089643239975, 0.0077046118676662445, -0.05184170603752136, -0.013340558856725693, -0.01707054115831852, -0.031210601329803467, -0.033290378749370575, 0.033189449459314346, -0.0025370081420987844, 0.13954900205135345, 0.010151294060051441, -0.0007989113219082355, 0.061271581798791885, -0.027495291084051132, 0.06556573510169983, -0.024454640224575996, -0.01247343048453331, 0.016331134364008904, -0.016839273273944855, -0.09505671262741089, 0.003830491565167904, 0.04788302630186081, -0.004675996955484152, -0.0006318117375485599, -0.037196170538663864, 0.018658407032489777, 0.04720046743750572, 0.05196758732199669, 0.012594497762620449, 0.043900154531002045, -0.0785076692700386, -0.025841183960437775, -0.24441055953502655, 0.037447765469551086, -0.018402785062789917, -0.039539799094200134, 0.01124169398099184, -0.03476662561297417, -0.002036510733887553, 0.0062123676761984825, -0.0003864682512357831, 0.05766557902097702, 0.07570521533489227, 0.013198506087064743, 0.010388043709099293, 0.010755122639238834, -0.006958341225981712, 0.06023654341697693, -0.005132279358804226, -0.0049566482193768024, -0.03075760416686535, 0.00863818358629942, -0.006571095436811447, -0.03361933305859566, -0.021513130515813828, -0.06808588653802872, 0.006223087199032307, 0.0257925596088171, 0.2380569875240326, 0.07881828397512436, -0.04358573257923126, -0.06834951043128967, 0.07477086782455444, 0.049951907247304916, -0.04573100805282593, -0.06783644109964371, 0.007496844511479139, 0.004390562418848276, 0.06583031266927719, 0.02559082955121994, 0.006129691377282143, -0.017474310472607613, -0.020977266132831573, 0.043734826147556305, 0.021516164764761925, -0.09581593424081802, -0.022442897781729698, -0.036124661564826965, -0.03649478033185005, 0.020277153700590134, -0.059303075075149536, 0.011163746938109398, 0.014870350249111652, 0.004565719980746508, 0.05453135445713997, 0.005338197108358145, -0.014361940324306488, 0.00019428771338425577, -0.03363237529993057, 0.015899529680609703, -0.011593176051974297, 0.04971880093216896, -0.01712929829955101, -0.04402732849121094, 0.002713441848754883, -0.04733831435441971, 0.06739149987697601, -0.002121555618941784, 0.033087871968746185, 0.017262456938624382, 0.04967675358057022, -0.05791018158197403, -0.027132732793688774, 0.07709817588329315, -0.02011164464056492, 0.05731914937496185, 0.03439638391137123, 0.07147618383169174, 0.036444298923015594, -0.04786602780222893, -0.009004957973957062, -0.014046354219317436, 0.03755903244018555, 0.0031796752009540796, 0.022696705535054207, -0.0015611425042152405, 0.02197185531258583, 0.005046583712100983, 0.017391428351402283, 0.023998942226171494, -0.0039882054552435875, -0.014924601651728153, -0.008104527369141579, -0.00038500671507790685, -0.08174795657396317, -0.07575904577970505, 0.026143500581383705, 0.026437783613801003, -0.2931350767612457, 0.0314035601913929, -0.032922856509685516, 0.008453009650111198, -0.005676223896443844, 0.021857043728232384, 0.01797393709421158, 0.04480135813355446, -0.02696889266371727, 0.042241647839546204, 0.04735809564590454, 0.03143055737018585, 0.03594556450843811, -0.0027356413193047047, -0.024410109966993332, 0.06681092828512192, 0.00557705108076334, -0.045950617641210556, 0.06850310415029526, -0.06513548642396927, 0.04137212783098221, 0.07308310270309448, 0.265681654214859, 0.0004352840769570321, 0.031686171889305115, 0.05857377126812935, -0.03309307619929314, 0.044562019407749176, 0.06993157416582108, -0.029492458328604698, -0.020855102688074112, 0.01543089933693409, 0.06863647699356079, -0.021963022649288177, 0.02301483042538166, -0.023760240525007248, -0.0020180654246360064, 0.018374186009168625, 0.06330937147140503, -0.049759551882743835, -0.04660112038254738, -0.02219598926603794, 0.017994701862335205, -0.022261343896389008, 0.10866671055555344, -0.04597541317343712, -0.051847368478775024, -0.061572201550006866, 0.03144180029630661, 0.02212570793926716, -0.11764021962881088, -0.07062581926584244, 0.009789260104298592, 0.012849919497966766, 0.029782211408019066, -0.0015302510000765324, -0.02526402845978737, -0.017472699284553528, -0.06971824914216995, -0.009666451252996922, 0.025698404759168625, -0.05213082581758499, -0.004664241336286068, 0.04031728580594063, 0.020705457776784897 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
to capture the `id`. So, if a user calls `http://localhost:3000/api/movies/573a1394f29313caabcdfa3e`, the movie that should be returned is Seven Samurai. **Another tip**: The `_id` property for the `sample_mflix` database in MongoDB is stored as an ObjectID, so you'll have to convert the string to an ObjectID. If you get stuck, create a thread on the MongoDB Community forums and we'll solve it together! Next, we'll take a look at how to access our MongoDB data within our Next.js pages. ## Example 2: Next.js pages with MongoDB In the last section, we saw how we can create an API endpoint and connect to MongoDB with it. In this section, we'll get our data directly into our Next.js pages. We'll do this using the getServerSideProps() method that is available to Next.js pages.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.05308668315410614, -0.0027448690962046385, 0.006311097647994757, -0.033480629324913025, 0.023331422358751297, -0.005645269528031349, 0.03145787492394447, 0.014674024656414986, 0.003098683897405863, -0.03459465876221657, -0.01884458027780056, -0.04600854963064194, 0.045073483139276505, 0.043796949088573456, -0.036722660064697266, 0.014887489378452301, 0.01142855640500784, 0.025769025087356567, -0.07357170432806015, 0.017684727907180786, 0.022659024223685265, -0.010181146673858166, -0.025320298969745636, -0.061095040291547775, -0.008664212189614773, 0.06380971521139145, -0.01847759261727333, -0.007541156839579344, -0.04253574460744858, -0.1694335639476776, -0.00044971334864385426, -0.04526194930076599, 0.02494432032108307, -0.071508027613163, 0.00434425612911582, -0.05523505434393883, -0.0066381837241351604, 0.02835702709853649, 0.01736360974609852, 0.06884447485208511, 0.03436269238591194, -0.002386782318353653, -0.018229736015200615, -0.0714811161160469, -0.013813209719955921, -0.057069987058639526, -0.003221666906028986, -0.011480731889605522, 0.018588174134492874, -0.03179159387946129, -0.02381291799247265, -0.03994378075003624, 0.01966807246208191, 0.012403134256601334, 0.02421998418867588, 0.04419946298003197, 0.007637834642082453, -0.0006093538831919432, 0.009345725178718567, 0.0409369058907032, 0.0836016908288002, 0.03907325863838196, -0.1727604866027832, 0.09525446593761444, 0.021834973245859146, 0.06972192972898483, -0.044244181364774704, -0.03697662800550461, 0.03930377960205078, 0.009794502519071102, -0.06933456659317017, 0.025334147736430168, 0.032905738800764084, 0.050818923860788345, 0.011468306183815002, -0.04560497775673866, 0.01924479380249977, -0.030204173177480698, 0.02506059966981411, 0.024190222844481468, -0.028758857399225235, -0.06226394698023796, -0.024429384618997574, -0.007776094134896994, -0.013792730867862701, -0.009033935144543648, 0.060254283249378204, -0.04050549492239952, 0.06312093138694763, 0.06347521394491196, -0.033866893500089645, -0.0186148714274168, 0.0026123400311917067, 0.03231704235076904, -0.09636790305376053, 0.0070087299682199955, 0.023102272301912308, 0.03579694777727127, 0.013565760105848312, 0.23723746836185455, -0.04036128148436546, 0.021464485675096512, 0.05584000423550606, -0.033649545162916183, 0.02494494989514351, -0.030000261962413788, -0.06979714334011078, -0.022235950455069542, 0.01159911323338747, 0.020277339965105057, -0.0026188569609075785, -0.054057780653238297, 0.017502855509519577, -0.0336754247546196, 0.06441932171583176, 0.028322208672761917, -0.00041867379331961274, 0.05524926632642746, -0.015582282096147537, -0.025828344747424126, 0.03097342513501644, 0.020135143771767616, 0.006873105186969042, -0.02716650813817978, 0.04419694095849991, -0.020630236715078354, 0.06605326384305954, 0.09162607043981552, 0.033488091081380844, 0.04265930876135826, 0.0357247069478035, -0.02275172248482704, -0.09563879668712616, -0.02436169795691967, -0.0005870776367373765, 0.034018997102975845, -0.01990352012217045, 0.007003562990576029, 0.018758142367005348, 0.0036835887003690004, -0.015743479132652283, -0.09347493201494217, -0.04030594974756241, -0.061192162334918976, -0.03978293016552925, 0.10116900503635406, -0.015608688816428185, 0.044303424656391144, -0.05429878085851669, -0.07804429531097412, 0.00046543750795535743, 0.05461215227842331, -0.0993705466389656, -0.006633031647652388, -0.034889597445726395, 0.002332201926037669, 0.038717031478881836, 0.05787540599703789, 0.007616778369992971, 0.033736590296030045, -0.02770242467522621, -0.0046663894318044186, 0.0006985333748161793, 0.066473588347435, 0.05038712918758392, -0.10525420308113098, -0.03802184760570526, 0.0347173810005188, -0.010095189325511456, -0.07052937895059586, -0.04314025864005089, 0.029632065445184708, -0.08647489547729492, 0.024733733385801315, 0.0759931430220604, 0.0006245660479180515, -0.08365005999803543, 0.023481907323002815, 0.0022852837573736906, -0.001898074639029801, -0.036144521087408066, -0.0322103425860405, -0.03967932611703873, 0.002786050783470273, 0.019460642710328102, -0.05818815156817436, 0.005544651299715042, -0.037104859948158264, 0.01647758111357689, 0.03656570240855217, -0.026135200634598732, 0.0009471208322793245, -0.006293256301432848, 0.007832113653421402, -0.007226981688290834, -0.04801173880696297, -0.005749316420406103, -0.012621992267668247, 0.02475546859204769, -0.05925242230296135, 0.11648539453744888, 0.03069690428674221, -0.02244751714169979, 0.026759255677461624, -0.027582120150327682, 0.03283324092626572, -0.02044360712170601, -0.013461641035974026, 0.0185418501496315, -0.014634529128670692, -0.046016108244657516, -0.01779908873140812, 0.04706926643848419, 0.023395095020532608, -0.037185583263635635, -0.02624485082924366, 0.025354165583848953, 0.000115324801299721, 0.047307226806879044, 0.02115602232515812, 0.019145861268043518, -0.06476924568414688, -0.027405304834246635, -0.26677465438842773, 0.03729278966784477, 0.00157274235971272, -0.010217431001365185, 0.011892938986420631, -0.0469914972782135, 0.03724732995033264, 0.000027313511964166537, 0.018551701679825783, 0.08323125541210175, 0.06970901787281036, -0.019259091466665268, -0.013719014823436737, 0.014368495903909206, -0.031728118658065796, 0.09136572480201721, 0.03115275129675865, -0.014613637700676918, -0.012307651340961456, 0.014757942408323288, 0.004456787835806608, -0.04561464488506317, -0.03207569569349289, -0.04196702688932419, 0.04049686715006828, -0.002938035177066922, 0.25073015689849854, 0.08924727141857147, 0.002580881817266345, -0.04663802683353424, 0.06035666540265083, 0.03373312950134277, -0.040324319154024124, -0.08053039759397507, 0.018434837460517883, -0.040821488946676254, 0.004853608552366495, 0.0005238560843281448, 0.036740634590387344, -0.05587185174226761, -0.018072165548801422, 0.002848081523552537, 0.05120226368308067, -0.0889982357621193, -0.004390934482216835, -0.06995640695095062, -0.05538662150502205, -0.030866606160998344, -0.025635847821831703, 0.023539841175079346, 0.015431827865540981, 0.027750197798013687, 0.036881186068058014, 0.02593400329351425, -0.0025940630584955215, 0.018098844215273857, -0.02436530776321888, 0.004673405550420284, -0.016036683693528175, 0.0713476836681366, -0.01167705561965704, -0.028357943519949913, 0.01245764922350645, -0.0538092702627182, 0.04472775012254715, -0.020665932446718216, -0.01938534528017044, -0.02823028527200222, 0.05528685450553894, -0.029674267396330833, 0.012548178434371948, 0.07423795759677887, 0.04300036281347275, 0.03696003556251526, 0.02968875877559185, 0.03298865631222725, 0.0586712621152401, -0.052745286375284195, -0.017227482050657272, 0.000390123255783692, 0.017288126051425934, -0.03910764306783676, 0.0165949035435915, 0.0044363634660840034, 0.04989231005311012, 0.03845755010843277, 0.023490002378821373, 0.014917192980647087, 0.017688868567347527, -0.040670908987522125, 0.007526570465415716, 0.007247627712786198, -0.06601949781179428, -0.07177169620990753, -0.02477789670228958, 0.017729107290506363, -0.2967633008956909, 0.037558361887931824, -0.006252025254070759, 0.06438572704792023, 0.009163662791252136, 0.02105085738003254, 0.07395169883966446, 0.016666574403643608, -0.046002406626939774, 0.02880847454071045, 0.06468092650175095, 0.01648380607366562, 0.015688776969909668, 0.008228297345340252, 0.00436534034088254, 0.07916057854890823, 0.032214753329753876, -0.03981461375951767, 0.04594693332910538, -0.03787861764431, 0.03814292326569557, 0.04983455315232277, 0.23044639825820923, 0.02410510927438736, 0.010403377003967762, 0.06849785149097443, 0.011447570286691189, 0.06461615860462189, 0.05377085134387016, -0.028702883049845695, -0.00972894486039877, -0.016373421996831894, 0.1027996689081192, -0.05457708612084389, 0.02437562122941017, -0.019162865355610847, -0.023396287113428116, -0.002617740072309971, 0.016400916501879692, -0.015499981120228767, -0.045822229236364365, -0.03157813102006912, -0.04069835692644119, -0.015830788761377335, 0.09218590706586838, -0.057248424738645554, -0.04081970825791359, -0.04780730605125427, -0.012333936989307404, 0.01293173898011446, -0.05043014511466026, -0.041630204766988754, -0.028333177790045738, -0.005616695620119572, 0.04512618109583855, 0.019101925194263458, 0.015219107270240784, 0.01998462900519371, -0.04983561486005783, -0.025166211649775505, 0.013370481319725513, -0.04856483265757561, 0.033951327204704285, 0.014506400562822819, 0.007046253886073828 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
The `getServerSideProps()` method forces a Next.js page to load with server-side rendering. What this means is that every time this page is loaded, the `getServerSideProps()` method runs on the back end, gets data, and sends it into the React component via props. The code within `getServerSideProps()` is never sent to the client. This makes it a great place to implement our MongoDB queries. Let's see how this works in practice. Let's create a new file in the `pages` directory, and we'll call it `movies.tsx`. In this file, we'll add the following code: ``` import clientPromise from "../lib/mongodb"; import { GetServerSideProps } from 'next'; interface Movie { _id: string; title: string; metacritic: number; plot: string; } interface MoviesProps { movies: Movie]; }
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.06791716814041138, 0.00970955565571785, 0.015756264328956604, -0.04637715220451355, 0.01597617007791996, -0.00572946947067976, 0.039456479251384735, 0.03633836656808853, 0.022398153319954872, -0.017584942281246185, 0.013807207345962524, -0.013827488757669926, 0.03139973431825638, 0.03909500688314438, -0.018199922516942024, 0.013388398103415966, -0.002314335200935602, -0.0089688366279006, -0.023220308125019073, 0.006784670986235142, 0.03603541478514671, -0.022932177409529686, -0.020198950543999672, -0.052970536053180695, 0.014174850657582283, 0.059733595699071884, -0.04970330744981766, -0.0018585765501484275, -0.0401906743645668, -0.20844969153404236, -0.026381658390164375, -0.10007909685373306, -0.017658943310379982, -0.045494090765714645, -0.03643414378166199, -0.03837817162275314, 0.02196183241903782, 0.02428833581507206, 0.028328701853752136, 0.03600969910621643, 0.022238759323954582, 0.0450747087597847, -0.058393727988004684, -0.07244370877742767, -0.03680174797773361, -0.06275822967290878, -0.008443813771009445, -0.02566356770694256, 0.012920849025249481, -0.03611929342150688, -0.03120138868689537, -0.015391876921057701, 0.028930403292179108, 0.022114502266049385, 0.051366064697504044, 0.03933650627732277, 0.022239603102207184, 0.040016837418079376, 0.020950080826878548, 0.05459046736359596, 0.06270390748977661, 0.0018505020998418331, -0.1378515213727951, 0.09322677552700043, 0.0672270804643631, 0.05922514945268631, -0.06696916371583939, 0.00628737173974514, 0.03035856783390045, 0.018983416259288788, -0.042097821831703186, 0.021614639088511467, 0.020386669784784317, 0.0751943290233612, 0.012018938548862934, -0.06324099749326706, -0.0034627646673470736, -0.01713695377111435, 0.03353983908891678, 0.010469799861311913, -0.045876093208789825, -0.0873025432229042, -0.026219582185149193, 0.03581143170595169, -0.003003362799063325, -0.02108391933143139, 0.01972137950360775, -0.029702652245759964, 0.05802806466817856, 0.04833061248064041, -0.04755432903766632, -0.06931759417057037, 0.024483826011419296, 0.03039431758224964, -0.08687478303909302, 0.010049206204712391, 0.02333773858845234, 0.028849923983216286, -0.009812196716666222, 0.21372663974761963, -0.06282690912485123, 0.01887878216803074, 0.03516611456871033, 0.0010387094225734472, -0.006314924452453852, -0.02829340659081936, -0.01985744759440422, -0.01466532051563263, -0.028260434046387672, 0.03701648488640785, -0.00037635868648067117, -0.02366642653942108, 0.02065363898873329, -0.07448424398899078, 0.01980222389101982, -0.0009312687325291336, -0.010326961986720562, 0.033289432525634766, -0.023093072697520256, 0.0029198804404586554, 0.0007213365170173347, 0.0404544472694397, 0.013208822347223759, -0.015708891674876213, 0.023833073675632477, -0.02897757850587368, 0.053457051515579224, 0.07918141037225723, 0.020139126107096672, 0.04106897488236427, 0.03175244480371475, 0.010465985164046288, -0.06952785700559616, 0.005433117970824242, 0.017694827169179916, 0.021225465461611748, 0.006270680110901594, 0.0019349247450008988, 0.02796925976872444, 0.0387054868042469, -0.002082637744024396, -0.06097852811217308, -0.040675289928913116, -0.05771201103925705, -0.03710835427045822, 0.0730772316455841, -0.009264380671083927, 0.07320807874202728, -0.025533687323331833, -0.0035944622941315174, -0.007350453641265631, 0.05574158579111099, -0.07020696252584457, 0.006147871725261211, -0.03519390895962715, 0.0001646250020712614, 0.0025816482957452536, 0.049829546362161636, -0.052258118987083435, -0.005474932957440615, -0.011969467625021935, 0.03219962492585182, 0.025664670392870903, 0.026532530784606934, 0.024980712682008743, -0.08875308185815811, -0.0008358433260582387, 0.03473025560379028, 0.009814629331231117, -0.07339078933000565, -0.05778134614229202, 0.018264178186655045, -0.044716838747262955, -0.03448915854096413, 0.09685631096363068, 0.02767390012741089, -0.07535946369171143, -0.00025735856615938246, -0.010955280624330044, 0.024160729721188545, 0.01369453128427267, -0.01909102499485016, -0.051656436175107956, 0.016792934387922287, 0.030185749754309654, -0.060089945793151855, -0.017767734825611115, -0.031074542552232742, 0.021112019196152687, 0.02617061324417591, -0.052740633487701416, -0.04204729199409485, -0.05189700797200203, -0.015197678469121456, 0.014322505332529545, -0.018392017111182213, -0.0252302847802639, -0.03726289048790932, 0.039755210280418396, -0.021718114614486694, 0.12332720309495926, 0.02938036061823368, -0.015214113518595695, 0.051476508378982544, -0.038375694304704666, 0.04722314700484276, 0.005181254353374243, 0.020077655091881752, 0.030327146872878075, -0.030705519020557404, -0.08950843662023544, 0.00955796055495739, 0.056718919426202774, 0.0129802031442523, -0.05184375122189522, -0.0320785753428936, 0.014055510982871056, 0.06266586482524872, 0.0899575799703598, 0.04120471328496933, 0.02640448696911335, -0.04114701598882675, -0.029629608616232872, -0.2611851990222931, 0.02925381250679493, -0.028876282274723053, -0.03629744425415993, 0.010108595713973045, -0.0694723129272461, 0.03709409385919571, 0.004817345179617405, -0.012386854737997055, 0.06510385870933533, 0.11569233983755112, 0.010242260992527008, 0.011104428209364414, 0.019591165706515312, -0.025355901569128036, 0.02235463261604309, 0.041189901530742645, -0.014231220819056034, -0.057615041732788086, 0.009856357239186764, -0.032887108623981476, -0.05179425701498985, -0.04626859724521637, -0.05339585617184639, 0.043467894196510315, 0.017810435965657234, 0.25820308923721313, 0.08403894305229187, 0.013087240047752857, -0.04599860683083534, 0.04510652646422386, 0.01992053911089897, -0.05587588995695114, -0.11652480065822601, 0.013465292751789093, -0.028083888813853264, 0.02917431853711605, -0.010671586729586124, 0.062084466218948364, -0.012627902440726757, -0.048246853053569794, -0.007669847924262285, 0.016155654564499855, -0.06251069158315659, 0.00957891158759594, -0.04724367707967758, -0.02545829862356186, -0.027351014316082, -0.043291524052619934, 0.046608779579401016, 0.024595756083726883, -0.006789531093090773, 0.02558532916009426, 0.03364146128296852, -0.020598607137799263, -0.006093848496675491, 0.004955830052495003, 0.013202497735619545, -0.009425891563296318, 0.07138857990503311, 0.008633692748844624, -0.014237732626497746, 0.02015065774321556, -0.03206954151391983, 0.06433124095201492, 0.0029016556218266487, 0.01843073032796383, -0.03546050935983658, 0.05630124360322952, -0.017983365803956985, -0.03445657342672348, 0.1187712550163269, -0.017413103953003883, 0.04506899416446686, -0.012949668802320957, 0.044841136783361435, 0.04909724369645119, -0.024203961715102196, -0.013465974479913712, 0.048395782709121704, 0.04363136738538742, -0.0011980605777353048, 0.03571082279086113, 0.014753405936062336, 0.02432100847363472, -0.002130465116351843, -0.003604393918067217, -0.004063371568918228, -0.0043095992878079414, -0.0054047806188464165, -0.0019136827904731035, 0.023956960067152977, -0.05224350839853287, -0.026170849800109863, 0.025121504440903664, -0.009903100319206715, -0.3081393837928772, -0.009743650443851948, 0.009453385137021542, -0.014652654528617859, -0.03867914900183678, 0.012167520821094513, 0.028931662440299988, 0.02273743972182274, -0.03412657603621483, 0.010313600301742554, 0.019838428124785423, 0.012187264859676361, 0.0058941952884197235, 0.017251772806048393, -0.0013985922560095787, 0.0739033967256546, 0.06613942235708237, -0.04902438819408417, 0.05366965010762215, -0.07793765515089035, 0.04009947553277016, 0.02253914251923561, 0.24143943190574646, 0.011548209935426712, 0.04093559458851814, 0.056088391691446304, -0.0049769701436161995, 0.022770468145608902, 0.05049528181552887, 0.008493808098137379, -0.01668289676308632, 0.0038477745838463306, 0.07334654778242111, -0.03583747148513794, 0.01662033423781395, -0.009357734583318233, -0.010971223935484886, 0.05364323407411575, 0.007959500886499882, -0.025313405320048332, -0.039220716804265976, -0.027599869295954704, 0.01675446517765522, 0.002049108734354377, 0.08720339089632034, -0.07392718642950058, -0.05594779923558235, -0.06759802997112274, -0.010807303711771965, 0.027851630002260208, -0.06110755354166031, -0.048571206629276276, 0.007281108293682337, -0.05995579808950424, 0.006971771363168955, 0.03313867002725601, -0.005943764932453632, -0.02053370326757431, -0.06936100870370865, 0.0049886503256857395, 0.052811361849308014, -0.08799216896295547, 0.017897486686706543, 0.03498253598809242, 0.04379960894584656 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
interface MoviesProps { movies: Movie]; } const Movies: React.FC = ({ movies }) => { return ( TOP 20 MOVIES OF ALL TIME (According to Metacritic) {movies.map((movie) => ( {MOVIE.TITLE} {MOVIE.METACRITIC} {movie.plot} ))} ); }; export default Movies;
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.08184941858053207, -0.02953866869211197, 0.008570076897740364, -0.03569154441356659, 0.04046177864074707, 0.021024612709879875, 0.03928661718964577, 0.026221085339784622, 0.02207108959555626, -0.014812877401709557, -0.0057913740165531635, -0.0599047876894474, 0.03612937405705452, 0.05506516247987747, -0.02470424585044384, 0.017666328698396683, 0.010104062035679817, 0.02304491214454174, -0.046709463000297546, 0.0026524795684963465, 0.09892798215150833, -0.03021262027323246, -0.026672063395380974, -0.08311628550291061, 0.04441361874341965, 0.02421727031469345, -0.020254580304026604, -0.012022539973258972, -0.05373663082718849, -0.1803857386112213, -0.06206458434462547, -0.07366650551557541, 0.05405506119132042, 0.007804320193827152, -0.0340607613325119, -0.06966430693864822, -0.00396101176738739, 0.010852179490029812, -0.0053054881282150745, 0.05500027537345886, -0.027621543034911156, 0.020719874650239944, 0.012143794447183609, -0.09198091924190521, -0.04487556219100952, -0.0533813051879406, -0.04039623215794563, 0.003490711562335491, 0.03807974234223366, 0.010243927128612995, 0.004832302685827017, -0.02118242345750332, 0.0007547097047790885, 0.019830627366900444, -0.013988619670271873, 0.035042427480220795, 0.001068633864633739, 0.03833287954330444, 0.03403579443693161, 0.030378198251128197, 0.03227589279413223, 0.016736671328544617, -0.20185570418834686, 0.0557112954556942, 0.08979485183954239, 0.01454508863389492, -0.05618026852607727, -0.008748618885874748, -0.018421389162540436, 0.056699834764003754, -0.07680610567331314, 0.02774134837090969, 0.05059119686484337, 0.06732770800590515, -0.004303032532334328, -0.04697774350643158, -0.0326668880879879, -0.005835915915668011, -0.009130015969276428, 0.005197189748287201, -0.03817210718989372, -0.050399258732795715, -0.026653125882148743, 0.019423291087150574, 0.01782047003507614, -0.018591228872537613, 0.03424735367298126, -0.009540874511003494, 0.04783610999584198, 0.04145989567041397, -0.0337819904088974, -0.02743101865053177, -0.020945288240909576, 0.037686560302972794, -0.08481308072805405, 0.0036939079873263836, 0.06349629908800125, 0.044621068984270096, -0.00028870563255622983, 0.2595096230506897, -0.05759530887007713, -0.008449619635939598, 0.05448472872376442, -0.03866458311676979, 0.0015670948196202517, -0.04755117744207382, -0.00842625368386507, -0.010497897863388062, 0.015401779673993587, 0.04047013074159622, -0.0475931279361248, -0.01184822153300047, 0.03541390225291252, -0.06767618656158447, 0.022796954959630966, 0.013374426402151585, 0.028538282960653305, 0.04590822756290436, 0.00009563104686094448, -0.04046758636832237, 0.047029927372932434, 0.01648947037756443, 0.011731890961527824, -0.042435672134160995, 0.024680884554982185, -0.040039632469415665, 0.05337681248784065, 0.058236729353666306, 0.01698959805071354, 0.02166691981256008, 0.04524542763829231, 0.007988260127604008, -0.061449844390153885, 0.023333564400672913, -0.019852768629789352, 0.06816719472408295, 0.005646535661071539, 0.0015630620764568448, 0.0303859431296587, 0.02053447626531124, -0.009854692965745926, -0.08602290600538254, -0.034772615879774094, -0.0868295356631279, -0.03501536697149277, 0.1029287725687027, -0.03225322812795639, 0.05277114734053612, -0.024114828556776047, 0.06182647496461868, -0.007163645699620247, 0.04132385179400444, -0.08543338626623154, 0.0008376728510484099, -0.0007230224437080324, 0.0008824779069982469, 0.03165894001722336, 0.029446126893162727, -0.052434321492910385, 0.0386020690202713, -0.06040145456790924, -0.00018895456742029637, 0.009772919118404388, 0.05319754779338837, 0.03856198117136955, -0.07451882213354111, -0.015108119696378708, 0.03913216292858124, -0.0014506650622934103, -0.03422275558114052, -0.050579629838466644, 0.016954736784100533, -0.031199026852846146, 0.0014856575289741158, 0.08943284302949905, 0.0045043895952403545, -0.01699919067323208, -0.012861473485827446, 0.002086010528728366, 0.009356574155390263, 0.009293021634221077, -0.030446238815784454, -0.05909818410873413, 0.031461626291275024, 0.03780321404337883, -0.03699079528450966, -0.015066287480294704, -0.048329971730709076, 0.027091391384601593, 0.04869920387864113, -0.05432461202144623, 0.0069396900944411755, -0.03092190809547901, -0.009468799456954002, -0.004880561958998442, 0.003971161786466837, -0.03514908626675606, -0.02110620215535164, 0.0465347059071064, -0.005304323974996805, 0.09268471598625183, 0.009806429967284203, -0.024723486974835396, 0.03353118151426315, -0.016535399481654167, 0.05629981309175491, -0.04262183979153633, -0.03441641479730606, 0.027312930673360825, 0.020167196169495583, -0.07046258449554443, -0.008458047173917294, 0.04710715636610985, 0.029132908210158348, -0.06918026506900787, -0.02077678218483925, 0.026779063045978546, 0.008577520959079266, 0.05859166383743286, 0.03230331838130951, 0.04615049809217453, -0.06032769754528999, -0.05569005385041237, -0.2708991467952728, 0.04750945046544075, -0.0037801009602844715, -0.044784460216760635, -0.007383068557828665, -0.05398041009902954, -0.008991393260657787, 0.00487631605938077, 0.04386381059885025, 0.09048216044902802, 0.07189375162124634, 0.01749771647155285, -0.03320719674229622, 0.03855502977967262, -0.02175602875649929, -0.019832951948046684, -0.011845286935567856, 0.020462768152356148, -0.020434195175766945, 0.0022482769563794136, -0.02378438413143158, -0.03621085360646248, -0.001490465016104281, -0.06028144061565399, 0.0317375510931015, -0.018507612869143486, 0.23637312650680542, 0.06537599861621857, 0.010609688237309456, -0.03228982910513878, 0.05108864977955818, 0.03616494685411453, -0.01370979379862547, -0.07382167875766754, 0.03867717832326889, -0.01791561022400856, 0.02261233888566494, 0.008945684880018234, 0.005677681416273117, -0.010190611705183983, 0.006872605998069048, -0.004189758095890284, 0.00036877754610031843, -0.0790526494383812, -0.016820447519421577, -0.06909675151109695, -0.04149387404322624, 0.016078520566225052, -0.04040899500250816, 0.03673239424824715, 0.0026386224199086428, -0.029085639864206314, 0.03899982571601868, 0.03459060192108154, -0.030023302882909775, 0.00738895870745182, -0.055488940328359604, -0.01260195393115282, -0.01495338510721922, 0.05170721560716629, -0.029430726543068886, -0.015245554968714714, 0.025867154821753502, -0.04792971536517143, 0.03323103487491608, 0.007181036751717329, 0.021112175658345222, -0.008418313227593899, 0.026829635724425316, -0.032891225069761276, -0.035756465047597885, 0.061991941183805466, -0.01755465194582939, 0.029908981174230576, 0.03543739765882492, 0.04572947323322296, 0.043075013905763626, 0.019189830869436264, 0.02303522452712059, -0.013401560485363007, 0.031798165291547775, 0.0032721315510571003, 0.03283127397298813, 0.02073119767010212, 0.022930394858121872, 0.027346426621079445, 0.04032948613166809, -0.013031413778662682, -0.004005377646535635, -0.01478118821978569, 0.008927393704652786, -0.007592238951474428, -0.04249947518110275, -0.02029990218579769, 0.02542159892618656, -0.010404006578028202, -0.3206953704357147, -0.01266501285135746, 0.022388391196727753, -0.012735060416162014, -0.013588768430054188, -0.0015946788480505347, 0.0177280455827713, 0.003183266380801797, -0.05702400580048561, 0.038556646555662155, 0.001464411965571344, 0.0458235889673233, 0.029647398740053177, 0.005452644545584917, 0.006089447066187859, 0.037190791219472885, 0.04639507457613945, -0.028940541669726372, 0.11004547029733658, -0.030032264068722725, 0.03669266402721405, 0.05796045437455177, 0.2537440061569214, -0.005021374206990004, 0.015579599887132645, 0.034711819142103195, -0.03377074748277664, 0.03203914314508438, 0.02614620514214039, -0.009249081835150719, 0.008658411912620068, -0.023333827033638954, 0.09738347679376602, -0.035894881933927536, 0.008417956531047821, 0.01889944076538086, -0.021159809082746506, 0.023105667904019356, 0.0218997523188591, -0.0019592409953475, -0.039742156863212585, -0.01748628355562687, 0.011425001546740532, -0.02759881690144539, 0.10472708940505981, -0.0686754658818245, -0.03131711855530739, -0.06119375675916672, -0.027002325281500816, 0.007740464061498642, -0.07151708006858826, -0.006821225397288799, 0.01641305908560753, -0.013242794200778008, 0.035787273198366165, 0.004264533519744873, 0.0006066883215680718, -0.011443773284554482, -0.059239745140075684, -0.01621856912970543, 0.02943703718483448, -0.08687610179185867, 0.02893376164138317, 0.02740873210132122, 0.03966469317674637 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
export const getServerSideProps: GetServerSideProps = async () => { try { const client = await clientPromise; const db = client.db("sample_mflix"); const movies = await db .collection("movies") .find({}) .sort({ metacritic: -1 }) .limit(20) .toArray(); return { props: { movies: JSON.parse(JSON.stringify(movies)) }, }; } catch (e) { console.error(e); return { props: { movies: [] } }; } }; ``` As you can see from the example above, we are importing the same `clientPromise` utility class, and our MongoDB query is exactly the same within the `getServerSideProps()` method. The only thing we really needed to change in our implementation is how we parse the response. We need to stringify and then manually parse the data, as Next.js is strict.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.0726381167769432, 0.002975661540403962, -0.012631257064640522, -0.05644145607948303, 0.036750029772520065, -0.03653828054666519, 0.03789034113287926, 0.01676994003355503, 0.03038822114467621, -0.010426053777337074, 0.0019497150788083673, -0.04342467337846756, 0.020575568079948425, 0.02527722902595997, -0.02604559063911438, 0.0087038679048419, 0.021046990528702736, 0.01830269582569599, -0.05059955641627312, 0.033944789320230484, 0.024707114323973656, 0.010185864754021168, -0.039440643042325974, -0.0712587758898735, 0.02408234030008316, 0.05782490596175194, -0.011166717857122421, 0.0010105115361511707, -0.040896885097026825, -0.20272178947925568, -0.027943968772888184, -0.10955177992582321, -0.00575680285692215, -0.03342847898602486, -0.022313900291919708, -0.03238917887210846, 0.01377151906490326, 0.027232611551880836, -0.009905067272484303, 0.09373539686203003, 0.024499187245965004, -0.0017933748895302415, -0.058945197612047195, -0.1016344279050827, -0.027427513152360916, -0.05061072111129761, -0.029826141893863678, -0.007283031940460205, 0.030957231298089027, -0.03968978300690651, -0.05274633690714836, -0.018862396478652954, 0.007625148165971041, 0.0036540627479553223, 0.06841976195573807, 0.03159833326935768, -0.003837012453004718, 0.04807696491479874, 0.04154267907142639, 0.05413634330034256, 0.05688247084617615, 0.0011405370896682143, -0.15241946280002594, 0.09823546558618546, 0.055427186191082, 0.030944064259529114, -0.07319347560405731, -0.022436056286096573, -0.002318094251677394, 0.02078191563487053, -0.015777036547660828, 0.01695217378437519, 0.044722869992256165, 0.0921962708234787, -0.008514251559972763, -0.03143582493066788, -0.022045426070690155, -0.03334243968129158, 0.02673231065273285, 0.03910708799958229, -0.04944892227649689, -0.0705534815788269, -0.020119614899158478, 0.039701852947473526, 0.03251241520047188, -0.03393161669373512, -0.015388961881399155, -0.024044251069426537, 0.06440538167953491, 0.019690433517098427, -0.06184486299753189, -0.02200322411954403, -0.001329024089500308, 0.060106974095106125, -0.07588998973369598, 0.012517721392214298, 0.015318469144403934, 0.02307754196226597, 0.00300110736861825, 0.19896091520786285, -0.018776100128889084, 0.04979899153113365, 0.029464561492204666, -0.009168537333607674, 0.0020526996813714504, -0.029094425961375237, -0.02602768875658512, -0.04146793112158775, -0.0004522085073404014, 0.0010299725690856576, -0.018793560564517975, 0.004178315866738558, 0.014026226475834846, -0.06551351398229599, 0.0013331046793609858, 0.02616054192185402, 0.002348601818084717, 0.014947319403290749, -0.009168359450995922, -0.009475777857005596, 0.024958323687314987, 0.028544850647449493, 0.009543107822537422, -0.02791944146156311, 0.038463737815618515, -0.02208217792212963, 0.04524083435535431, 0.07949615269899368, 0.031774938106536865, 0.062121979892253876, 0.02773340418934822, -0.015941325575113297, -0.058243684470653534, -0.004808324854820967, 0.010151589289307594, 0.042150046676397324, 0.007583862170577049, -0.00014658829604741186, 0.042565274983644485, 0.0220191553235054, 0.011853549629449844, -0.11274906247854233, -0.06480014324188232, -0.05922945216298103, -0.03443315252661705, 0.1375836730003357, -0.04432135820388794, 0.05177709460258484, -0.03534359857439995, -0.015523495152592659, -0.012539109215140343, 0.026214107871055603, -0.042600974440574646, -0.038570139557123184, -0.004819410853087902, 0.005316452588886023, 0.047674961388111115, 0.04342840611934662, -0.05811784788966179, -0.018788665533065796, -0.016231467947363853, 0.03877044841647148, 0.023669661954045296, 0.05282367765903473, 0.04652890935540199, -0.05799443647265434, -0.005915977526456118, 0.027917414903640747, 0.021502798423171043, -0.0528515987098217, -0.023032762110233307, 0.033554207533597946, -0.07632692158222198, 0.007477638311684132, 0.08595001697540283, -0.0014128166949376464, -0.05407240614295006, -0.03627424314618111, 0.02841934561729431, 0.014163749292492867, -0.029829947277903557, -0.014698703773319721, -0.03053852915763855, 0.0036305319517850876, 0.045541223138570786, -0.039711859077215195, -0.0055267163552343845, -0.05637998506426811, 0.04674091935157776, 0.021010400727391243, -0.03246097266674042, -0.053219299763441086, -0.015917854383587837, -0.012722047977149487, -0.01929648220539093, -0.020050499588251114, -0.026739124208688736, -0.05833253636956215, 0.038077276200056076, 0.00747471209615469, 0.12314026057720184, 0.029216643422842026, 0.0002959746343549341, 0.04314934462308884, -0.03754862770438194, 0.05876723676919937, -0.016077522188425064, -0.030322784557938576, 0.008037861436605453, -0.01899251900613308, -0.09644545614719391, 0.00980705302208662, 0.040325701236724854, 0.02648943103849888, -0.018190499395132065, -0.0376262292265892, 0.03531532362103462, 0.05179981142282486, 0.05858904495835304, 0.04723435267806053, 0.008150522597134113, -0.061255957931280136, -0.05110188573598862, -0.25129660964012146, 0.019749226048588753, 0.007164751645177603, -0.059237249195575714, 0.012752283364534378, -0.037563059478998184, 0.018497448414564133, 0.012845354154706001, -0.008269702084362507, 0.06659410893917084, 0.06363262981176376, 0.016259152442216873, 0.00980393961071968, 0.03180665522813797, -0.018840301781892776, 0.036181554198265076, 0.026839030906558037, -0.00737123703584075, -0.017503738403320312, 0.0017211540834978223, -0.0411490723490715, -0.027679936960339546, -0.03860834613442421, -0.05223517864942551, 0.02459263987839222, -0.0033098277635872364, 0.24235104024410248, 0.052802056074142456, -0.011104835197329521, -0.028647202998399734, 0.04997602477669716, -0.003996936604380608, 0.021121039986610413, -0.08465248346328735, 0.02771829441189766, -0.00929036270827055, 0.006286912597715855, -0.0030088198836892843, 0.023085061460733414, -0.008046104572713375, -0.010871567763388157, 0.020530251786112785, -0.007338832598179579, -0.08778015524148941, 0.0023039481602609158, -0.05521292984485626, -0.056361280381679535, 0.030915511772036552, -0.038639575242996216, 0.04018775746226311, 0.003969299606978893, 0.0030028512701392174, 0.04397957772016525, 0.008211836218833923, -0.020693572238087654, -0.006266284268349409, -0.031191939488053322, 0.0076175532303750515, 0.0037250537425279617, 0.03761745244264603, 0.012560263276100159, -0.03274670988321304, 0.01244943868368864, -0.021439719945192337, 0.03632944077253342, 0.010287242941558361, 0.026879355311393738, -0.018658941611647606, 0.05146918445825577, -0.02448812499642372, -0.03802260011434555, 0.08607304841279984, -0.024094611406326294, 0.03873015195131302, 0.023548347875475883, 0.0903054028749466, 0.02961774915456772, -0.027870342135429382, -0.01794511452317238, 0.02946230210363865, 0.05581263452768326, 0.0073446910828351974, 0.02199934422969818, -0.01791965961456299, 0.039338234812021255, 0.002608709968626499, 0.03145351633429527, 0.029751375317573547, 0.012999054975807667, -0.014517170377075672, -0.01943313330411911, -0.013936672359704971, -0.04738791659474373, -0.045064136385917664, 0.029342366382479668, 0.004261088091880083, -0.291574090719223, 0.03637642040848732, 0.03848692774772644, -0.01876073330640793, -0.008848246186971664, 0.028399277478456497, 0.03906125947833061, -0.0018576323054730892, -0.04993423819541931, 0.04135996103286743, -0.004071740433573723, 0.035833124071359634, 0.010829685255885124, 0.0007195381331257522, 0.0012782993726432323, 0.0901816189289093, 0.05083596333861351, -0.05420827493071556, 0.07264402508735657, -0.07907470315694809, 0.03361673280596733, 0.05881384387612343, 0.27824440598487854, -0.007970689795911312, 0.030005911365151405, 0.06278356164693832, -0.02528267726302147, 0.018000267446041107, 0.08028494566679001, 0.004069922957569361, 0.0008513704524375498, 0.006409280467778444, 0.09411979466676712, -0.03240349516272545, 0.028715195134282112, -0.015243570320308208, -0.0176076740026474, 0.03056580014526844, 0.019134923815727234, -0.035273436456918716, -0.032803915441036224, -0.007778749335557222, 0.0005078321555629373, -0.015264459885656834, 0.09387930482625961, -0.06124170497059822, -0.07886871695518494, -0.10010185837745667, -0.044052157551050186, 0.007046722341328859, -0.06825953722000122, -0.05234619602560997, 0.01865045726299286, -0.025601815432310104, 0.006962031126022339, 0.008019965142011642, -0.01435302384197712, -0.009593408554792404, -0.07271196693181992, 0.0026062133256345987, 0.040947940200567245, -0.07806988060474396, -0.012811103835701942, 0.057224713265895844, 0.03417558595538139 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
Our page component called `Movies` gets the props from our `getServerSideProps()` method, and we use that data to render the page showing the top movie title, metacritic rating, and plot. Your result should look something like this: ![Top 20 movies][6] This is great. We can directly query our MongoDB database and get all the data we need for a particular page. The contents of the `getServerSideProps()` method are never sent to the client, but the one downside to this is that this method runs every time we call the page. Our data is pretty static and unlikely to change all that often. What if we pre-rendered this page and didn't have to call MongoDB on every refresh? We'll take a look at that next!
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.07934286445379257, 0.024927552789449692, 0.008632437326014042, -0.03727265074849129, 0.02639603801071644, 0.0029331708792597055, 0.022144939750432968, 0.036172036081552505, 0.018635347485542297, 0.0023246079217642546, 0.010047949850559235, 0.008073222823441029, 0.047162171453237534, 0.07017906755208969, -0.029662642627954483, 0.0027278857305645943, 0.03586852177977562, 0.02983892895281315, -0.025294989347457886, -0.001955720130354166, 0.05630237236618996, 0.00039925880264490843, -0.012250684201717377, -0.0527881495654583, 0.028997695073485374, 0.027651935815811157, -0.05266151577234268, -0.020194219425320625, -0.040133923292160034, -0.21266472339630127, -0.019248073920607567, -0.09137803316116333, 0.03348070755600929, -0.026707392185926437, -0.02698451280593872, -0.06173902377486229, -0.009840860031545162, 0.05988839268684387, 0.02379632368683815, 0.04314422234892845, 0.03312861919403076, 0.03807275369763374, -0.044622551649808884, -0.061628736555576324, -0.055704265832901, -0.0630173310637474, -0.011050618253648281, -0.023304590955376625, 0.0519859679043293, -0.006128698121756315, -0.013984953053295612, -0.0289546437561512, 0.003886633552610874, 0.03443479537963867, 0.046180568635463715, 0.013084440492093563, 0.014789547771215439, 0.02591322548687458, 0.0026782688219100237, 0.011413808912038803, 0.04482597857713699, 0.03534409776329994, -0.12779857218265533, 0.07872210443019867, 0.03883219137787819, 0.03920239582657814, -0.057178378105163574, -0.011489968746900558, 0.006783057004213333, 0.015645846724510193, -0.043061260133981705, 0.006719617638736963, 0.015072117559611797, 0.04618208855390549, 0.03180699050426483, -0.03627092391252518, -0.031215840950608253, -0.036759473383426666, 0.009594311006367207, 0.02298332005739212, -0.06308045983314514, -0.07748377323150635, -0.03791431337594986, 0.007266939152032137, 0.016499262303113937, -0.0347539559006691, 0.06090095266699791, -0.0031214875634759665, 0.0489366389811039, 0.03502044454216957, -0.030958646908402443, -0.04853174090385437, 0.008791076950728893, 0.03167002275586128, -0.10089759528636932, -0.0025104149244725704, 0.04023968428373337, 0.020319441333413124, 0.028127213940024376, 0.2177097201347351, -0.05190154165029526, 0.01805657334625721, 0.050919849425554276, -0.04060665890574455, 0.00564189488068223, -0.03280973806977272, 0.009812276810407639, 0.028512101620435715, -0.016199447214603424, 0.05240356922149658, 0.005573199596256018, -0.02525951713323593, 0.004431292414665222, -0.0859212651848793, 0.03155435994267464, 0.012343576177954674, 0.00862202513962984, 0.04116784408688545, 0.0005070985644124448, -0.04358860105276108, 0.0028789183124899864, 0.03612415865063667, 0.012222793884575367, -0.033274635672569275, 0.06904668360948563, -0.06254881620407104, 0.09271842986345291, 0.07853743433952332, 0.01211174950003624, 0.051231179386377335, 0.03556858003139496, 0.010036708787083626, -0.08532379567623138, -0.004767580423504114, -0.010619372129440308, 0.00880072545260191, 0.02103513292968273, 0.007124469615519047, 0.02743322029709816, 0.03577658161520958, -0.004363295156508684, -0.052892014384269714, -0.051831334829330444, -0.08172363042831421, -0.05811386555433273, 0.13589100539684296, -0.02195996604859829, 0.05904918164014816, -0.04087114334106445, -0.042164627462625504, -0.03172304481267929, 0.04148082435131073, -0.04147908464074135, -0.0015338546363636851, -0.04377292841672897, 0.002514940220862627, -0.0005361562944017351, 0.051945559680461884, -0.028252553194761276, -0.017376957461237907, -0.02348553203046322, 0.023940550163388252, -0.006190421525388956, 0.033322256058454514, 0.0055854166857898235, -0.08493153750896454, -0.01058147381991148, 0.03246181085705757, -0.017574939876794815, -0.05635632574558258, -0.044564276933670044, 0.017154470086097717, -0.06010041385889053, 0.011361479759216309, 0.11126374453306198, 0.029890382662415504, -0.056626442819833755, 0.010622682049870491, 0.015355376526713371, -0.01524628046900034, 0.0320180244743824, -0.01927826553583145, -0.06205599009990692, 0.023561306297779083, 0.015322856605052948, -0.07886335998773575, -0.030519092455506325, -0.03481590002775192, 0.04138694703578949, 0.011158348061144352, -0.05619197338819504, -0.06262858211994171, -0.05560275912284851, 0.01525621023029089, -0.009222915396094322, -0.025195438414812088, -0.011285921558737755, -0.04047546163201332, 0.03795427829027176, -0.025707600638270378, 0.11325374245643616, -0.006502630654722452, -0.0521283783018589, 0.029419628903269768, -0.009693354368209839, 0.049631424248218536, -0.04276624321937561, -0.005845371633768082, 0.027800511568784714, -0.01785995252430439, -0.0783262774348259, -0.016157181933522224, 0.05260055884718895, 0.00619902927428484, -0.04380396008491516, -0.020048240199685097, -0.018772372975945473, 0.04821297898888588, 0.06327539682388306, 0.03383929654955864, 0.06659642606973648, -0.06093641743063927, -0.0195423886179924, -0.2650296986103058, 0.00975020695477724, -0.017854133620858192, -0.024276437237858772, 0.022580865770578384, -0.05883130431175232, 0.01109321415424347, 0.006792995613068342, 0.01403930876404047, 0.0734156146645546, 0.08120384812355042, 0.020698292180895805, -0.015113684348762035, 0.010500172153115273, -0.034416187554597855, 0.031106987968087196, 0.0009236015612259507, 0.003065554890781641, -0.04123109579086304, 0.008419516496360302, -0.009393071755766869, -0.06075000762939453, -0.01787051372230053, -0.0750063881278038, 0.045136746019124985, 0.012752694077789783, 0.2665780782699585, 0.0768563374876976, -0.030572589486837387, -0.03965066000819206, 0.057042889297008514, 0.02943482995033264, -0.08752170950174332, -0.0965198501944542, 0.043448276817798615, -0.028006108477711678, 0.01310555450618267, 0.04517773166298866, 0.011813187971711159, -0.024115031585097313, 0.00657496927306056, -0.006677871569991112, 0.03798818588256836, -0.08939790725708008, -0.006445171311497688, -0.051081184297800064, -0.028696823865175247, 0.012448498047888279, -0.03756014630198479, 0.02923799492418766, 0.021223729476332664, -0.017610924318432808, 0.02198105677962303, 0.0483006052672863, -0.006248475052416325, -0.003326777368783951, -0.020202625542879105, 0.002599556464701891, -0.02353570982813835, 0.04683278501033783, 0.015280942432582378, -0.017420528456568718, -0.014676633290946484, -0.039254289120435715, 0.040126316249370575, -0.001631186343729496, -0.0020774658769369125, -0.027194691821932793, 0.042042966932058334, -0.02395649440586567, -0.03713222220540047, 0.08660119026899338, 0.012301403097808361, 0.05946550890803337, 0.028754519298672676, 0.052615080028772354, 0.06659514456987381, -0.03236415237188339, -0.006125524174422026, 0.016446249559521675, 0.04689706116914749, -0.005270165856927633, 0.044213611632585526, 0.005414148792624474, 0.027982717379927635, -0.0047374302521348, 0.00827767327427864, -0.0042311348952353, -0.03298376873135567, 0.0038138527888804674, -0.0035794328432530165, -0.007326877675950527, -0.06662928313016891, -0.015263644978404045, 0.022076312452554703, 0.0002566082985140383, -0.29679444432258606, 0.02166014537215233, 0.0021390130277723074, 0.0339193157851696, 0.01753154769539833, 0.006961911451071501, 0.024131037294864655, 0.061159901320934296, -0.0211496502161026, 0.02812531776726246, 0.027259044349193573, 0.03664935380220413, -0.0050598145462572575, -0.01526754442602396, -0.0295964777469635, 0.09422899037599564, 0.04038506746292114, -0.05656706541776657, 0.04347853362560272, -0.054242148995399475, 0.05076998099684715, 0.025748519226908684, 0.24984237551689148, 0.021901851519942284, 0.038924410939216614, 0.03790051490068436, -0.005449039861559868, 0.009778563864529133, 0.04719484969973564, 0.006705067586153746, -0.007980678230524063, -0.02853943593800068, 0.09273648262023926, -0.01385505497455597, 0.019447315484285355, 0.04827385023236275, -0.030387980863451958, -0.0004251617647241801, 0.01300762314349413, -0.04796476662158966, -0.03539029508829117, 0.01373046264052391, -0.018726661801338196, -0.00690558971837163, 0.10914064943790436, -0.050841886550188065, -0.03641454130411148, -0.038117777556180954, -0.008857999928295612, 0.017309321090579033, -0.07224316149950027, -0.01976374164223671, 0.0037661392707377672, -0.0340491458773613, 0.03293287009000778, 0.021922685205936432, -0.002623765729367733, 0.015801135450601578, -0.02810363471508026, -0.00355887389741838, 0.005987873300909996, -0.06032991036772728, 0.009436292573809624, 0.027454284951090813, 0.03101200982928276 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
## Example 3: Next.js static generation with MongoDB For our final example, we'll take a look at how static page generation can work with MongoDB. Let's create a new file in the `pages` directory and call it `top.tsx`. For this page, what we'll want to do is render the top 1,000 movies from our MongoDB database. Top 1,000 movies? Are you out of your mind? That'll take a while, and the database round trip is not worth it. Well, what if we only called this method once when we built the application so that even if that call takes a few seconds, it'll only ever happen once and our users won't be affected? They'll get the top 1,000 movies delivered as quickly as or even faster than the 20 using `serverSideProps()`. The magic lies in the `getStaticProps()` method, and our implementation looks like this:
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.08200717717409134, 0.019842373207211494, 0.006574586965143681, -0.048410262912511826, 0.04935380443930626, 0.0016335244290530682, -0.026443805545568466, 0.003986811731010675, 0.002904495457187295, -0.023392029106616974, 0.02663506753742695, -0.013289735652506351, 0.008659806102514267, 0.0324106328189373, -0.004542049486190081, 0.01807013712823391, -0.00038546198629774153, 0.006240572780370712, -0.06668401509523392, -0.00936805084347725, 0.047456637024879456, -0.004310563672333956, -0.027788540348410606, -0.038916654884815216, -0.008584653958678246, 0.012252378277480602, -0.048442330211400986, -0.019274717196822166, -0.024045011028647423, -0.21789753437042236, -0.018376260995864868, -0.10231773555278778, 0.021549304947257042, -0.05011870339512825, -0.03905630484223366, -0.06048378720879555, -0.01538830902427435, 0.06329254806041718, -0.014431877993047237, 0.051278527826070786, 0.037436630576848984, 0.06084718182682991, -0.05738949030637741, -0.07986439764499664, -0.052045416086912155, -0.04596896469593048, -0.019275279715657234, -0.029325993731617928, -0.008709806948900223, -0.03323494270443916, -0.03382091224193573, -0.05780164524912834, 0.022529596462845802, -0.005079750902950764, 0.01785271242260933, 0.02423769235610962, 0.02556188777089119, 0.028978778049349785, 0.0029231938533484936, 0.008631888777017593, 0.047382839024066925, 0.0308903269469738, -0.12472356110811234, 0.08227331936359406, 0.07511675357818604, 0.05789396911859512, -0.04777253046631813, -0.008376688696444035, 0.011024725623428822, 0.06206691265106201, -0.06169573962688446, 0.032951053231954575, 0.028194205835461617, 0.07756411284208298, 0.015361594036221504, -0.0303067397326231, -0.03250253200531006, -0.02668323926627636, -0.0024265465326607227, 0.004170109983533621, -0.030795151367783546, -0.08735799789428711, -0.029401371255517006, 0.02202591858804226, -0.020058631896972656, -0.02897627279162407, 0.03156057372689247, -0.018849361687898636, 0.04521758109331131, 0.02920154109597206, -0.025212978944182396, -0.016595588997006416, 0.02423706091940403, 0.02986110746860504, -0.062409620732069016, 0.011366406455636024, 0.0511167012155056, 0.04092099517583847, -0.0072099994868040085, 0.17877230048179626, -0.03472420573234558, 0.020795240998268127, 0.06143628805875778, -0.045395590364933014, 0.016776639968156815, -0.0317426435649395, -0.0015576069708913565, -0.008641229942440987, -0.024610036984086037, 0.03687474504113197, 0.008029559627175331, -0.028300385922193527, 0.014533024281263351, -0.07184375822544098, 0.048638809472322464, -0.012891432270407677, 0.007928394712507725, 0.026845941320061684, -0.024877751246094704, -0.011011217720806599, 0.02075226418673992, 0.050259195268154144, 0.03303975611925125, -0.025583308190107346, 0.06313290446996689, -0.04916834086179733, 0.07824783772230148, 0.09262803196907043, 0.037653058767318726, 0.06366152316331863, 0.03124535270035267, 0.010400709696114063, -0.08964366465806961, -0.003976383246481419, -0.002456395886838436, 0.00438885111361742, 0.0000531302357558161, 0.02827351912856102, 0.0003908630460500717, 0.019813060760498047, 0.009370102547109127, -0.034022845327854156, -0.040249112993478775, -0.12119927257299423, -0.03243211284279823, 0.12786148488521576, -0.011024028062820435, 0.09417678415775299, -0.028109872713685036, -0.03990395367145538, -0.0016499251360073686, 0.057188693434000015, -0.05128224566578865, -0.027954090386629105, -0.0302120391279459, 0.02247101068496704, 0.04078524559736252, 0.054876599460840225, -0.025804691016674042, 0.0000784362928243354, -0.0529596246778965, 0.007992533966898918, -0.0090121328830719, 0.06826598197221756, -0.004298877902328968, -0.09859514236450195, 0.028314093127846718, 0.027393825352191925, 0.00126187305431813, -0.02299119345843792, -0.04637850448489189, 0.025456489995121956, -0.04279036447405815, -0.027414489537477493, 0.09278342872858047, 0.008065110072493553, -0.07341986149549484, -0.008952583186328411, 0.016026418656110764, 0.026040520519018173, 0.04342815279960632, -0.023184984922409058, -0.06678628921508789, 0.0566740483045578, 0.01848108135163784, -0.08229168504476547, 0.02811250649392605, -0.021882927045226097, 0.03304312378168106, 0.05202743038535118, -0.04113747552037239, -0.01825270615518093, -0.02135319449007511, -0.022382989525794983, -0.012560492381453514, -0.021128730848431587, -0.011183900758624077, 0.011212822049856186, 0.046620484441518784, -0.05113380774855614, 0.09167572110891342, 0.016750793904066086, -0.02580329217016697, 0.030115274712443352, -0.05057435482740402, 0.06062490493059158, -0.015004443004727364, -0.021815797314047813, 0.05401192978024483, 0.002323801862075925, -0.09156319499015808, 0.016146300360560417, 0.054872870445251465, 0.028972867876291275, -0.031998906284570694, -0.012443232350051403, -0.0009787763701751828, 0.057530034333467484, 0.033690303564071655, 0.05165833607316017, 0.01388213038444519, -0.08230370283126831, -0.023105250671505928, -0.26167386770248413, 0.03957442566752434, 0.007415951229631901, -0.01646403782069683, 0.056915514171123505, -0.055000148713588715, 0.02637571282684803, -0.02135632559657097, -0.029580779373645782, 0.0418117493391037, 0.06825745850801468, -0.02186696045100689, -0.0019176515052095056, 0.0005920932162553072, -0.01366459857672453, 0.02519027702510357, -0.0022655308712273836, 0.014678784646093845, -0.026300109922885895, 0.002585894661024213, 0.00044376408914104104, 0.0007929704152047634, -0.008994216099381447, -0.1136828362941742, 0.05636979267001152, -0.014890527352690697, 0.22356565296649933, 0.03824177011847496, 0.013502244837582111, -0.08309246599674225, 0.07680299133062363, -0.018467828631401062, -0.05407014116644859, -0.09532050788402557, -0.010212807916104794, 0.014141139574348927, 0.04097417742013931, -0.00865816231817007, 0.032995980232954025, -0.000677097006700933, -0.021663499996066093, 0.004292530007660389, 0.012676004320383072, -0.08119729906320572, -0.024599429219961166, -0.02885039709508419, -0.030385278165340424, -0.017628639936447144, -0.002418002812191844, 0.01264011301100254, 0.013986759819090366, -0.020518271252512932, 0.036379072815179825, 0.01001590583473444, -0.018549395725131035, -0.03211876377463341, -0.053084149956703186, 0.029625654220581055, -0.04119018465280533, 0.07561755925416946, 0.013186045922338963, -0.04237033426761627, 0.012388348579406738, -0.019680559635162354, 0.047387998551130295, -0.007793894037604332, 0.001810980960726738, -0.02930845133960247, 0.01669088378548622, -0.05213765427470207, -0.011420102789998055, 0.08683087676763535, 0.00039668389945290983, -0.006816373206675053, 0.019917845726013184, 0.03642375022172928, 0.029530130326747894, -0.022823764011263847, -0.03139284625649452, -0.012081312946975231, 0.031208205968141556, -0.005080839153379202, 0.024099860340356827, 0.004037865437567234, 0.015031039714813232, -0.002841359470039606, 0.031098131090402603, 0.007921220734715462, -0.016624337062239647, -0.02574409358203411, -0.042063768953084946, 0.014853659085929394, -0.06679977476596832, -0.05971278250217438, 0.018439004197716713, -0.003143798094242811, -0.30881553888320923, 0.026543159037828445, 0.012598811648786068, 0.020147398114204407, 0.010302897542715073, 0.04901432618498802, 0.04638909175992012, 0.04415234550833702, -0.0004954432952217758, 0.04167604446411133, 0.012014695443212986, 0.00943521223962307, 0.03985096514225006, 0.013524143025279045, 0.025216590613126755, 0.08241155743598938, 0.04258573427796364, -0.0235983207821846, 0.0441727451980114, -0.05327579751610756, 0.05671508237719536, 0.021248847246170044, 0.25997042655944824, 0.010905131697654724, 0.00966622307896614, 0.10037582367658615, -0.014886652119457722, 0.06656306982040405, 0.051195912063121796, -0.014132614247500896, -0.011725648306310177, -0.013846171088516712, 0.07944169640541077, -0.03689122200012207, 0.006995822302997112, 0.014138760045170784, -0.03542531281709671, 0.03561079502105713, 0.01902155764400959, -0.022474205121397972, -0.03810182213783264, -0.015406115911900997, -0.026522444561123848, -0.005734916310757399, 0.08687100559473038, -0.04307829588651657, -0.0297128614038229, -0.0797276720404625, 0.012381372973322868, 0.02493281289935112, -0.08300262689590454, -0.044276122003793716, -0.011830352246761322, -0.021418537944555283, 0.05822015181183815, 0.025144804269075394, 0.011614599265158176, 0.022125015035271645, -0.049983855336904526, 0.0033349234145134687, 0.03993501141667366, -0.05365968123078346, 0.04398571327328682, 0.05742151290178299, 0.04469205439090729 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
``` import { ObjectId } from "mongodb"; import clientPromise from "../lib/mongodb"; import { GetStaticProps } from "next"; interface Movie { _id: ObjectId; title: string; metacritic: number; plot: string; } interface TopProps { movies: Movie[]; } export default function Top({ movies }: TopProps) { return ( TOP 1000 MOVIES OF ALL TIME (According to Metacritic) {movies.map((movie) => ( {MOVIE.TITLE} {MOVIE.METACRITIC} {movie.plot} ))} ); } export const getStaticProps: GetStaticProps = async () => { try { const client = await clientPromise; const db = client.db("sample_mflix");
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.07732196897268295, -0.0028191395103931427, 0.017954330891370773, -0.07057406008243561, 0.03374779224395752, -0.016224265098571777, 0.032442402094602585, 0.01407907996326685, 0.04335147887468338, -0.0023040513042360544, -0.0017834517639130354, -0.047438833862543106, 0.030973918735980988, 0.05178685113787651, -0.04407494142651558, 0.016430649906396866, -0.006794694811105728, 0.01441500149667263, -0.071825310587883, 0.005986860021948814, 0.056084223091602325, -0.010873050428926945, -0.046053871512413025, -0.07572352886199951, 0.02689109370112419, 0.05457790195941925, -0.017284376546740532, -0.014626519754529, -0.022354833781719208, -0.1866675168275833, -0.03388216346502304, -0.08007225394248962, 0.04057248681783676, -0.03484172374010086, -0.02543904446065426, -0.03711016848683357, 0.019549762830138206, 0.02364606410264969, 0.0010449141263961792, 0.06190492957830429, 0.04224778711795807, -0.0035738805308938026, -0.026814507320523262, -0.1154632419347763, -0.020137468352913857, -0.06950421631336212, -0.034815188497304916, 0.00605312455445528, 0.03963258117437363, -0.02171391062438488, -0.018662596121430397, -0.04413818195462227, -0.005387033801525831, 0.01818162575364113, 0.03168568015098572, 0.051487214863300323, -0.006226748693734407, 0.03253844752907753, 0.036716755479574203, 0.04932745546102524, 0.05511147528886795, 0.0027480984572321177, -0.17218340933322906, 0.09396961331367493, 0.07091740518808365, 0.059822410345077515, -0.051351819187402725, -0.030828503891825676, -0.005699452944099903, 0.010235107503831387, -0.05584118887782097, 0.028441283851861954, 0.051136359572410583, 0.08515050262212753, 0.010003268718719482, -0.06815146654844284, -0.007319325115531683, -0.03484548628330231, 0.027493277564644814, 0.031652458012104034, -0.038680095225572586, -0.057696547359228134, -0.017543992027640343, 0.018400315195322037, 0.01955854333937168, -0.027546687051653862, 0.023217665031552315, -0.015830624848604202, 0.040730319917201996, 0.038505669683218, -0.01816467009484768, -0.01352524571120739, 0.017956746742129326, 0.03220398351550102, -0.08707261085510254, 0.03943365812301636, 0.045997317880392075, 0.028277864679694176, -0.0024538938887417316, 0.2310785949230194, -0.044151708483695984, 0.006964947562664747, 0.045837339013814926, -0.008645834401249886, 0.006973378825932741, -0.04135878011584282, -0.03942938521504402, -0.036723777651786804, -0.0077436272986233234, 0.01593664288520813, -0.03629842773079872, -0.055704839527606964, 0.020034557208418846, -0.044699858874082565, 0.05391669645905495, 0.039596907794475555, 0.009807580150663853, 0.006922079715877771, -0.02945222333073616, -0.00971202366054058, 0.0208993349224329, 0.02956455759704113, 0.014507784508168697, -0.002189732389524579, 0.023884844034910202, -0.02879488840699196, 0.03825664520263672, 0.08631588518619537, 0.01348022185266018, 0.03202250972390175, 0.04360443726181984, 0.020803341642022133, -0.11148353666067123, -0.010289625264704227, 0.011313067749142647, 0.024597546085715294, -0.019061239436268806, 0.003952149301767349, 0.04830705374479294, 0.008947069756686687, -0.009563303552567959, -0.08849329501390457, -0.06243927404284477, -0.07177004218101501, -0.02585236355662346, 0.0989014133810997, -0.03343428298830986, 0.07351122051477432, -0.035278744995594025, 0.007281309925019741, 0.013659443706274033, 0.03931395709514618, -0.07768244296312332, -0.012981702573597431, -0.02408318966627121, -0.007895699702203274, 0.0378909558057785, 0.07136181741952896, -0.054665710777044296, -0.003062599804252386, -0.059001535177230835, 0.008584840223193169, 0.006365831010043621, 0.061433836817741394, 0.029904749244451523, -0.06283734738826752, -0.0048685222864151, 0.019489984959363937, 0.012993154115974903, -0.037517864257097244, -0.032168272882699966, 0.005070098675787449, -0.05905484780669212, -0.00840957835316658, 0.08327637612819672, -0.008201436139643192, -0.06060789152979851, -0.017010575160384178, 0.024531226605176926, 0.0046754139475524426, 0.005396860186010599, -0.006430067587643862, -0.04723627120256424, 0.0289632398635149, 0.030642233788967133, -0.039184749126434326, -0.007871964946389198, -0.03320661187171936, 0.040927547961473465, 0.029688239097595215, -0.028274687007069588, -0.012482653371989727, -0.0033639685716480017, -0.016551611945033073, -0.03442532941699028, -0.036482155323028564, -0.02425023540854454, -0.023518521338701248, 0.03523947671055794, -0.019780661910772324, 0.1311335414648056, 0.027378780767321587, -0.0006611823919229209, 0.03672674670815468, -0.018999800086021423, 0.053484492003917694, -0.0382036417722702, -0.033949114382267, 0.02231423929333687, -0.014410312287509441, -0.07302232831716537, -0.02095857448875904, 0.04694937542080879, 0.020349593833088875, -0.01965484395623207, -0.009252753108739853, 0.033910028636455536, 0.025445619598031044, 0.06384695321321487, 0.018728503957390785, 0.012787495739758015, -0.0749717652797699, -0.07643280923366547, -0.26106056571006775, 0.06310602277517319, -0.009082583710551262, -0.02314946800470352, -0.01908191479742527, -0.023079628124833107, 0.015462541952729225, 0.01582099124789238, -0.00880847591906786, 0.08182064443826675, 0.05867324396967888, 0.004517003893852234, 0.004021718632429838, 0.024862390011548996, -0.028548404574394226, 0.015506038442254066, -0.0007480221102014184, -0.013089831918478012, -0.027707649394869804, 0.003960016183555126, -0.02157154493033886, -0.039196766912937164, -0.042239394038915634, -0.07214922457933426, 0.01671125926077366, 0.005633324850350618, 0.2297760397195816, 0.04185617342591286, -0.026910942047834396, -0.03857953101396561, 0.07920648157596588, 0.005800895858556032, -0.009140955284237862, -0.08985648304224014, 0.04807709902524948, -0.007766959723085165, 0.030049821361899376, 0.01487808022648096, 0.008479014970362186, -0.017090797424316406, -0.019791631028056145, 0.031032005324959755, 0.025042841210961342, -0.06007101386785507, -0.029469385743141174, -0.056350331753492355, -0.03508836403489113, 0.004596254788339138, -0.036884237080812454, 0.02923903428018093, 0.011968523263931274, 0.004427965730428696, 0.056129902601242065, 0.021119875833392143, -0.040092550218105316, -0.00876327883452177, -0.046363577246665955, 0.0036481863353401423, -0.04136495292186737, 0.05262468010187149, -0.009176531806588173, -0.039250969886779785, 0.03139246255159378, -0.021804219111800194, 0.03936421871185303, -0.0066716414876282215, 0.03316619619727135, -0.02708389051258564, 0.03355821967124939, -0.03695206716656685, -0.026777049526572227, 0.08298251032829285, -0.023031095042824745, 0.032552413642406464, 0.05177938938140869, 0.0840623676776886, 0.036627043038606644, -0.014000660739839077, 0.00932163093239069, 0.01965712383389473, 0.03122236207127571, -0.0029296025168150663, 0.00938855204731226, -0.007633019704371691, 0.04183758422732353, -0.005066927522420883, 0.022483881562948227, 0.001025575795210898, -0.0026210537180304527, -0.01753179356455803, 0.016380736604332924, -0.020336952060461044, -0.017462143674492836, -0.04248782619833946, 0.03870004042983055, 0.008130019530653954, -0.31956565380096436, 0.007969996891915798, -0.000994750065729022, 0.008622330613434315, -0.023651747032999992, 0.026140892878174782, 0.02579798735678196, -0.0032824715599417686, -0.04218091443181038, 0.013543002307415009, 0.005454115103930235, 0.03087921068072319, 0.0308227501809597, 0.030868887901306152, -0.007051054388284683, 0.05347058176994324, 0.03425220772624016, -0.04892180860042572, 0.07853734493255615, -0.017780764028429985, 0.023007869720458984, 0.060200706124305725, 0.2508816421031952, -0.0012868294725194573, 0.032956358045339584, 0.05719016119837761, -0.027657991275191307, 0.05061489716172218, 0.07809217274188995, 0.0034278694074600935, 0.0008558266563341022, 0.0005106889875605702, 0.08496425300836563, -0.030829215422272682, 0.026380600407719612, 0.00660748640075326, -0.012612263672053814, 0.04426732659339905, 0.038152944296598434, -0.018675263971090317, -0.038877591490745544, -0.009108278900384903, 0.019326262176036835, -0.02519545704126358, 0.10440518707036972, -0.0646764412522316, -0.03964029625058174, -0.0797654464840889, -0.01942419819533825, 0.0075731053948402405, -0.10670366883277893, -0.040993038564920425, 0.04041293263435364, -0.0028725750744342804, 0.011155050247907639, -0.0034431552048772573, 0.010186344385147095, 0.028321312740445137, -0.06213885173201561, -0.012321469374001026, 0.04450478404760361, -0.09583242982625961, 0.006220133043825626, 0.02916177734732628, 0.022241845726966858 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
const db = client.db("sample_mflix"); const movies = await db .collection("movies") .find({}) .sort({ metacritic: -1 }) .limit(1000) .toArray(); return { props: { movies: JSON.parse(JSON.stringify(movies)) }, }; } catch (e) { console.error(e); return { props: { movies: [] }, }; } }; ``` At a glance, this looks very similar to the `movies.tsx` file we created earlier. The only significant changes we made were changing our `limit` from `20` to `1000` and our `getServerSideProps()` method to `getStaticProps()`. If we navigate to `localhost:3000/top` in our browser, we'll see a long list of movies. ![Top 1000 movies][7]
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.07689962536096573, -0.01311954390257597, 0.05014989897608757, -0.049845971167087555, 0.031692661345005035, 0.0019217567751184106, 0.020809579640626907, 0.013268438167870045, 0.05017213895916939, -0.013291768729686737, 0.00988257396966219, -0.010821443051099777, 0.0353815071284771, 0.059674378484487534, -0.017720943316817284, 0.0027455068193376064, 0.017617976292967796, -0.01398245058953762, -0.0522945411503315, 0.0021760950330644846, 0.03073311410844326, 0.009791875258088112, -0.029407808557152748, -0.08399999141693115, 0.03691866621375084, 0.038362205028533936, -0.041084062308073044, -0.004732431843876839, -0.030839651823043823, -0.21280960738658905, -0.03535420820116997, -0.10642685741186142, 0.026946302503347397, -0.011188164353370667, -0.020836476236581802, -0.07342727482318878, -0.012762248516082764, 0.00011745152005460113, -0.017180398106575012, 0.05983417481184006, 0.025672471150755882, 0.04122255742549896, -0.042763594537973404, -0.07339908927679062, -0.0783260241150856, -0.045037973672151566, -0.02913101390004158, 0.00031880169990472496, 0.04234727472066879, -0.00846664048731327, -0.048111144453287125, -0.04691062122583389, 0.03441192954778671, 0.03167438879609108, 0.055823639035224915, 0.002304419409483671, 0.0015213488368317485, 0.05764994025230408, 0.0321456640958786, 0.04274406284093857, 0.07209406048059464, 0.009012633934617043, -0.15580014884471893, 0.08874278515577316, 0.07056419551372528, 0.03521458059549332, -0.05820546671748161, -0.026963628828525543, 0.0008576802210882306, 0.00029557637753896415, -0.024147411808371544, 0.04223278909921646, 0.03313891217112541, 0.09136968851089478, 0.0028925829101353884, -0.0222500991076231, -0.024152684956789017, -0.01223692111670971, 0.026781804859638214, 0.038918688893318176, -0.011342406272888184, -0.09831167757511139, -0.012952743098139763, -0.003592215944081545, 0.0025920665357261896, -0.03234511986374855, 0.017863061279058456, -0.02371867001056671, 0.06846505403518677, 0.027241311967372894, -0.018183333799242973, -0.025890570133924484, 0.008939981460571289, 0.05017123743891716, -0.07895492017269135, 0.001410123659297824, 0.028624223545193672, 0.05645614117383957, 0.013677727431058884, 0.20589248836040497, -0.01467100065201521, 0.040975891053676605, 0.04706697538495064, -0.01334783062338829, -0.005283009726554155, -0.04494275897741318, -0.014129516668617725, 0.0186410304158926, 0.006130770780146122, 0.020963246002793312, 0.0073243132792413235, -0.024164758622646332, 0.030694520100951195, -0.030078817158937454, 0.0005172533565200865, 0.010568271391093731, -0.002935576718300581, 0.021866366267204285, -0.0033875410445034504, -0.00016415404388681054, 0.02628878876566887, 0.029413828626275063, 0.021296070888638496, -0.05339916795492172, 0.02941397950053215, 0.02248223125934601, 0.06421409547328949, 0.11150531470775604, 0.03343064710497856, 0.04886258766055107, 0.025666065514087677, 0.007402070332318544, -0.07769396901130676, -0.009939269162714481, 0.008201409131288528, 0.03932923078536987, 0.020280994474887848, -0.03874574229121208, 0.03667774051427841, 0.0310191810131073, -0.013867873698472977, -0.10261700302362442, -0.04237337410449982, -0.0756666511297226, -0.030335281044244766, 0.13554666936397552, -0.036256343126297, 0.0437418632209301, -0.014198409393429756, -0.014853866770863533, -0.025037886574864388, 0.04884406551718712, -0.0669492781162262, -0.04082709550857544, -0.01682864874601364, 0.004524188116192818, 0.046223245561122894, 0.06191275641322136, -0.04352689906954765, 0.018028315156698227, -0.0054120770655572414, 0.013004611246287823, 0.003783418331295252, 0.05640489235520363, 0.01846916787326336, -0.05345788598060608, -0.018864287063479424, 0.030740877613425255, -0.03383507579565048, -0.04852978140115738, -0.026594877243041992, 0.011672800406813622, -0.07554913312196732, -0.0002312475990038365, 0.0690726637840271, -0.0065555088222026825, -0.06369459629058838, -0.02578222192823887, 0.026508592069149017, -0.004870765842497349, -0.0009054000838659704, -0.011776823550462723, -0.05267731845378876, 0.038589589297771454, 0.04646418243646622, -0.030965544283390045, -0.008843551389873028, -0.0616815909743309, 0.05274384468793869, 0.023732226341962814, -0.05752053111791611, -0.0532747358083725, -0.014280849136412144, -0.04626278206706047, -0.00930479634553194, -0.03037038818001747, -0.00443024467676878, -0.0030709661077708006, 0.05195300653576851, -0.014647683128714561, 0.13354989886283875, 0.010241706855595112, -0.04205119609832764, 0.08408566564321518, -0.05246216058731079, 0.046354491263628006, -0.03300471231341362, -0.04237405210733414, 0.0323217511177063, -0.044896263629198074, -0.06749162077903748, 0.01277377363294363, 0.04420291632413864, 0.04026785492897034, -0.022704344242811203, -0.040849823504686356, 0.014417632482945919, 0.037203654646873474, 0.052372802048921585, 0.0297998134046793, 0.05754343420267105, -0.0821191817522049, -0.07414242625236511, -0.26991933584213257, 0.023590736091136932, -0.0059362309984862804, -0.05523472651839256, 0.004589951131492853, -0.0427444763481617, -0.004198847804218531, -0.0007270161877386272, -0.016224607825279236, 0.07419247925281525, 0.04755956679582596, -0.009601249359548092, -0.009198116138577461, 0.00010871778067667037, -0.021854806691408157, 0.01214655116200447, -0.011936167255043983, 0.014570062048733234, -0.004126188810914755, 0.004132096190005541, -0.030102556571364403, -0.03407252952456474, -0.04800641909241676, -0.06933340430259705, 0.03212524205446243, -0.010165116749703884, 0.24893143773078918, 0.057446178048849106, 0.0060562752187252045, -0.052837204188108444, 0.07193681597709656, 0.004176285583525896, -0.01663726381957531, -0.06746959686279297, 0.03592450171709061, 0.01113962847739458, -0.0050130607560276985, -0.010289222002029419, 0.02123553492128849, 0.0046946145594120026, -0.04814857989549637, -0.002985709346830845, 0.007488724309951067, -0.07918041199445724, 0.0016499278135597706, -0.06047293171286583, -0.030554968863725662, 0.03040201961994171, -0.013155916705727577, 0.022147608920931816, 0.04915947839617729, 0.0058834669180214405, 0.008735215291380882, 0.03264893218874931, -0.007579971104860306, -0.01741020195186138, 0.0017650924855843186, -0.008769786916673183, -0.005136057268828154, 0.05075543373823166, -0.007833716459572315, -0.05260046198964119, 0.015489907935261726, -0.031273119151592255, 0.04308494180440903, -0.005857584998011589, 0.0323929488658905, -0.025948416441679, 0.044270697981119156, -0.02104574628174305, -0.03485937789082527, 0.08366721123456955, 0.007247925736010075, 0.013869901187717915, 0.02994726598262787, 0.041740283370018005, 0.0429622083902359, -0.015120700933039188, -0.004406338091939688, 0.014911273494362831, 0.04219035431742668, -0.002103786915540695, 0.01536591537296772, -0.005095569416880608, 0.014787942171096802, -0.00954566989094019, 0.01909199357032776, -0.0027769519947469234, -0.0038706541527062654, -0.002700074343010783, 0.007263377774506807, 0.01984090730547905, -0.06365744024515152, -0.012645178474485874, 0.02876262739300728, -0.016508353874087334, -0.2872622013092041, 0.03747452050447464, 0.018468625843524933, -0.012934642843902111, -0.011303740553557873, 0.05667922645807266, 0.03740766644477844, 0.022306231781840324, -0.02834163047373295, 0.02109585702419281, -0.003179625840857625, 0.0362597331404686, 0.03866320475935936, -0.0051303706131875515, 0.004447214771062136, 0.07260724902153015, 0.017926467582583427, -0.011011557653546333, 0.07593262195587158, -0.04415515065193176, 0.03660591319203377, 0.039874542504549026, 0.2605687081813812, -0.013471550308167934, 0.012487354688346386, 0.07139997184276581, -0.018970850855112076, 0.03173372894525528, 0.0614263154566288, -0.03290988877415657, -0.03499443456530571, -0.003407439449802041, 0.06628742814064026, -0.05189594626426697, 0.02498721331357956, -0.000060378577472874895, -0.009108270518481731, 0.033547621220350266, 0.02652529627084732, -0.03543185815215111, -0.04363187029957771, -0.021308658644557, -0.028371887281537056, -0.025179408490657806, 0.11156366020441055, -0.06448068469762802, -0.03199826553463936, -0.05774272605776787, -0.008942687883973122, 0.03311086446046829, -0.11593443155288696, -0.022657044231891632, -0.014104260131716728, -0.019089223816990852, 0.03869013488292694, 0.01552948635071516, 0.003685208735987544, -0.015498373657464981, -0.060842301696538925, -0.01600230485200882, 0.02672005072236061, -0.06256372481584549, -0.002948810812085867, 0.023348558694124222, 0.04760788753628731 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
![Top 1000 movies][7] Look at how tiny that scrollbar is. Loading this page took about 3.79 seconds on my machine, as opposed to the 981-millisecond response time for the `/movies` page. The reason it takes this long is that in development mode, the `getStaticProps()` method is called every single time (just like the `getServerSideProps()` method). But if we switch from development mode to production mode, we'll see the opposite. The `/top` page will be pre-rendered and will load almost immediately, while the `/movies` and `/api/movies` routes will run the server-side code each time.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.10511308908462524, -0.021257376298308372, 0.02515305019915104, -0.024123365059494972, 0.032037440687417984, 0.02732013165950775, 0.00008039743261178955, 0.007103505544364452, 0.040098752826452255, -0.010298719629645348, 0.012645035982131958, 0.001660182373598218, 0.042859453707933426, 0.06203105300664902, -0.0070670777931809425, 0.022087838500738144, 0.04739584028720856, -0.06480194628238678, -0.05133950710296631, 0.025567272678017616, 0.053357578814029694, -0.012328566052019596, -0.0202239491045475, -0.04432221129536629, 0.01898779720067978, -0.011539901606738567, -0.07242799550294876, -0.011910414323210716, -0.025841305032372475, -0.19957290589809418, -0.016481777653098106, -0.07751256227493286, 0.06865600496530533, -0.009354179725050926, -0.03147190809249878, -0.07531163096427917, -0.0011699249735102057, 0.02096426673233509, -0.011316719464957714, -0.01023713406175375, 0.02722509577870369, 0.04044082760810852, -0.007671239785850048, -0.05271919444203377, -0.026742519810795784, -0.018717240542173386, 0.0030344848055392504, 0.0007015073788352311, 0.019193552434444427, -0.03727710247039795, -0.01651705615222454, -0.042240604758262634, 0.08226774632930756, 0.014203020371496677, -0.028076330199837685, 0.002842494286596775, 0.01942172460258007, 0.023405490443110466, 0.04083262383937836, 0.024423733353614807, 0.04674699902534485, 0.012544910423457623, -0.1837490350008011, 0.08172057569026947, 0.04551539197564125, 0.009126775898039341, -0.02782869152724743, -0.02675791271030903, 0.010404098778963089, 0.03922269120812416, -0.09585724771022797, 0.05062786489725113, 0.06623360514640808, 0.06721162050962448, 0.0003233544121030718, -0.04041383042931557, -0.0022902158088982105, -0.016040189191699028, 0.006858424749225378, 0.01865849830210209, 0.008689994923770428, -0.07227316498756409, -0.062142763286828995, 0.012999553233385086, 0.008714602328836918, -0.01317873876541853, 0.045898765325546265, 0.0015828517498448491, 0.08194634318351746, 0.041074104607105255, -0.03061726503074169, -0.040516044944524765, 0.007864889688789845, 0.028871411457657814, -0.07779528200626373, -0.004461957141757011, 0.03314422070980072, 0.013736234046518803, -0.03442215174436569, 0.21415504813194275, -0.02270202711224556, 0.025915496051311493, 0.0716564878821373, -0.05124502256512642, 0.03392777219414711, -0.0312026496976614, -0.009049829095602036, 0.02187862992286682, -0.021985439583659172, 0.05861690640449524, -0.011984928511083126, 0.005666728597134352, 0.0646299198269844, -0.05371066927909851, 0.05825890600681305, -0.027321677654981613, -0.0008271186961792409, 0.03263649344444275, -0.01976487599313259, -0.006052530836313963, 0.009749959222972393, 0.011836633086204529, -0.012975296936929226, -0.07988816499710083, 0.008437007665634155, -0.05968078598380089, 0.06346273422241211, 0.11479160934686661, 0.03416779637336731, 0.04722084477543831, 0.04761607199907303, -0.015522041358053684, -0.05172106251120567, -0.02284601889550686, -0.015662239864468575, 0.005063981749117374, 0.0355243906378746, 0.0066993399523198605, 0.02342233620584011, -0.057203132659196854, -0.04220133647322655, -0.06255786865949631, -0.000869781943038106, -0.12066520750522614, -0.021155614405870438, 0.08912982791662216, -0.020374830812215805, 0.04760507121682167, -0.018507210537791252, -0.02469843253493309, -0.042526885867118835, 0.07040803879499435, -0.037677913904190063, -0.04150514304637909, -0.033788051456213, 0.0007202299893833697, 0.01120707206428051, 0.08028686046600342, -0.040689654648303986, 0.021856188774108887, 0.005690832622349262, -0.01674024946987629, -0.020606013014912605, 0.027927139773964882, 0.043648913502693176, -0.0647255927324295, -0.002509392099454999, 0.025806933641433716, -0.013626180589199066, -0.02076304331421852, -0.031810980290174484, 0.011061175726354122, -0.02303876355290413, 0.023760443553328514, 0.09121573716402054, 0.003805547021329403, -0.0762200728058815, 0.0285121351480484, 0.023173313587903976, 0.016452640295028687, 0.06672487407922745, -0.0393969900906086, -0.05664940923452377, 0.024101614952087402, 0.04829486832022667, -0.06985312700271606, 0.008766429498791695, -0.035588063299655914, 0.03393419459462166, 0.01657523214817047, -0.04633217304944992, -0.04944191873073578, -0.042767349630594254, -0.013051728717982769, -0.010374774225056171, 0.0016981600783765316, 0.008329564705491066, 0.01386720035225153, 0.06691206991672516, -0.009568512439727783, 0.10038033127784729, -0.007148735225200653, -0.04649088531732559, 0.046970050781965256, -0.03081262670457363, 0.03295837715268135, -0.02590690553188324, 0.022327745333313942, 0.036224365234375, 0.02058088220655918, -0.09963210672140121, -0.04788922518491745, 0.055625464767217636, -0.024978145956993103, -0.027978263795375824, -0.005705788265913725, -0.003706827759742737, 0.047444090247154236, 0.042220402508974075, 0.08914567530155182, 0.02452653832733631, -0.04725101217627525, -0.02887819893658161, -0.23910440504550934, 0.041234537959098816, -0.029693080112338066, -0.021181579679250717, 0.04326172173023224, -0.04013596102595329, 0.020757600665092468, -0.028992485255002975, 0.06164480373263359, 0.03959404304623604, 0.09249932318925858, 0.013534868136048317, -0.04224454239010811, -0.013987443409860134, -0.01742527447640896, 0.03859754651784897, 0.014730480499565601, 0.04957258328795433, -0.014359070919454098, -0.010232511907815933, 0.0008627764182165265, -0.020645735785365105, -0.03227504342794418, -0.06286744028329849, 0.040442727506160736, 0.002200826769694686, 0.21704275906085968, 0.04394695535302162, 0.021964484825730324, -0.06762457638978958, 0.03421065956354141, 0.07293209433555603, -0.07214469462633133, -0.1370866745710373, 0.03215096890926361, -0.002839488908648491, 0.06681467592716217, -0.024443604052066803, 0.037155695259571075, 0.009169910103082657, -0.022567516192793846, 0.024995476007461548, 0.02447698637843132, -0.09631069004535675, -0.04536357894539833, -0.014685412868857384, -0.003312967484816909, -0.015218554064631462, -0.05177256837487221, -0.011031911708414555, 0.0315934419631958, -0.06707651913166046, 0.006508799735456705, 0.030402222648262978, 0.009516977705061436, -0.017074737697839737, -0.017660966143012047, 0.015775561332702637, -0.03710814192891121, 0.07405080646276474, -0.0212404765188694, -0.05013781785964966, 0.026759104803204536, -0.04181455075740814, 0.023526806384325027, -0.007173085119575262, -0.004671527072787285, -0.005662151612341404, 0.03654566779732704, -0.032538171857595444, -0.02290935441851616, 0.05719177797436714, -0.03647949919104576, 0.023427791893482208, 0.034707628190517426, 0.0020915947388857603, 0.05979904159903526, -0.011725780554115772, 0.012880312278866768, -0.030852561816573143, 0.022987989708781242, 0.00903332233428955, 0.031825773417949677, 0.001629738719202578, 0.010756134986877441, -0.010444400832057, 0.025104613974690437, 0.008096519857645035, -0.02834131009876728, -0.007778096944093704, 0.01130718644708395, 0.02593039721250534, -0.06439735740423203, -0.008653396740555763, 0.03371655195951462, -0.017106911167502403, -0.3398088216781616, 0.05421195551753044, 0.02285657450556755, 0.013168389908969402, -0.027046160772442818, -0.020030412822961807, 0.030305512249469757, 0.03714743256568909, -0.005568197928369045, 0.04084154963493347, 0.022354628890752792, 0.029934439808130264, 0.03792707249522209, -0.022754093632102013, 0.02043391950428486, 0.048161763697862625, 0.03973957896232605, -0.04743027687072754, 0.0509256087243557, -0.0463515967130661, 0.027365710586309433, 0.013776959851384163, 0.22997884452342987, 0.0006354919751174748, 0.013162658549845219, 0.04720398411154747, -0.042457062751054764, 0.01028462965041399, 0.012299141846597195, -0.03800513222813606, 0.010524575598537922, -0.014086047187447548, 0.06277123838663101, -0.05402505397796631, 0.0012280760565772653, 0.030043765902519226, -0.032302968204021454, 0.019026895985007286, 0.00301223318092525, -0.008901555091142654, -0.016479400917887688, -0.019342124462127686, -0.0262462105602026, -0.0018037226982414722, 0.08889276534318924, -0.040716953575611115, -0.00033211251138709486, -0.05801011994481087, 0.0008895425125956535, 0.034415487200021744, -0.10384288430213928, -0.054724883288145065, 0.00046616169856861234, 0.029179124161601067, 0.02972741238772869, 0.030473900958895683, 0.005865229293704033, 0.013517013750970364, -0.04611700028181076, -0.030797047540545464, 0.006471657194197178, -0.023372147232294083, 0.01666312851011753, 0.038334645330905914, 0.058005400002002716 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
Let's switch to production mode. In your terminal window, stop the current app from running. To run our Next.js app in production mode, we'll first need to build it. Then, we can run the `start` command, which will serve our built application. In your terminal window, run the following commands: ``` npm run build npm run start ``` When you run the `npm run start` command, your Next.js app is served in production mode. The `getStaticProps()` method will not be run every time you hit the `/top` route as this page will now be served statically. We can even see the pre-rendered static page by navigating to the `.next/server/pages/top.html` file and seeing the 1,000 movies listed in plain HTML.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.04567830637097359, 0.014786011539399624, 0.04421338811516762, -0.057106759399175644, 0.042399123311042786, 0.03348507732152939, 0.0035972867626696825, 0.0016018872847780585, -0.00277165905572474, -0.03651996701955795, 0.02198774740099907, -0.023785030469298363, 0.014511496759951115, 0.05336891859769821, -0.006267094984650612, 0.028321249410510063, -0.01107482798397541, 0.0026188562624156475, -0.036953166127204895, 0.02198973298072815, 0.0186839047819376, 0.005637870170176029, -0.0039765252731740475, -0.05733196809887886, -0.02348615974187851, 0.02260548621416092, -0.06415798515081406, 0.013610444031655788, -0.022026529535651207, -0.16173061728477478, -0.035288695245981216, -0.08878404647111893, 0.014100589789450169, -0.04924996197223663, -0.004942598752677441, -0.05161222070455551, -0.0279495008289814, 0.023920796811580658, -0.0041991244070231915, 0.031523093581199646, 0.03085564449429512, 0.029928846284747124, -0.010792586952447891, -0.08589760214090347, -0.0352170355618, -0.048007454723119736, -0.014938641339540482, -0.02911153808236122, 0.055428650230169296, -0.04554831609129906, 0.004397701937705278, -0.08066736161708832, 0.038701072335243225, -0.04612397402524948, 0.007271059788763523, 0.024884076789021492, 0.023569688200950623, 0.05532059073448181, 0.039586346596479416, 0.032930754125118256, 0.021348128095269203, 0.024090824648737907, -0.1950804889202118, 0.08613856881856918, 0.07142990827560425, 0.015752600505948067, -0.04273723438382149, -0.006947618909180164, 0.006199711933732033, 0.047318149358034134, -0.06629550457000732, 0.05178285017609596, 0.01845504902303219, 0.05951668694615364, 0.003494514850899577, -0.05316397175192833, -0.03397630155086517, -0.003861525095999241, 0.027017440646886826, -0.004032976925373077, -0.001361561706289649, -0.07304693013429642, -0.03715936467051506, 0.052477236837148666, 0.01606876775622368, -0.010659366846084595, 0.030882861465215683, 0.013985691592097282, 0.05891113355755806, 0.037766728550195694, -0.0499359555542469, -0.041131649166345596, 0.015175587497651577, 0.028645789250731468, -0.04738413915038109, 0.0009219652856700122, 0.046042852103710175, 0.01248529925942421, -0.027573637664318085, 0.21576561033725739, -0.009761188179254532, 0.010945244692265987, 0.07049708068370819, -0.02307509258389473, 0.036979153752326965, -0.04774685576558113, -0.0376528762280941, 0.03954704850912094, -0.012035012245178223, 0.061255939304828644, 0.03743603453040123, -0.01301695965230465, 0.043244022876024246, -0.07022371143102646, 0.06284739822149277, -0.007377433590590954, -0.004585381131619215, 0.04296739399433136, -0.027348844334483147, -0.014256269671022892, 0.020710818469524384, 0.029459459707140923, 0.02431621588766575, -0.05966176092624664, 0.03711894154548645, -0.040321335196495056, 0.08591250330209732, 0.08790544420480728, 0.011670746840536594, 0.008561491034924984, 0.019439417868852615, -0.021908672526478767, -0.05688505619764328, -0.006854482460767031, -0.0020256503485143185, 0.011008666828274727, 0.0052746254950761795, -0.0025310174096375704, 0.020519336685538292, -0.009927080012857914, -0.027278199791908264, -0.04776125028729439, -0.00547634856775403, -0.12652455270290375, 0.002941686427220702, 0.0479385182261467, -0.029159488156437874, 0.07217755913734436, -0.047387972474098206, -0.047773901373147964, -0.04398244619369507, 0.05278009548783302, -0.05732200667262077, -0.03745628893375397, -0.008334395475685596, -0.0016277630347758532, 0.008502233773469925, 0.08441907167434692, -0.01866205595433712, -0.0048902323469519615, -0.055650338530540466, -0.020469248294830322, -0.009817833080887794, 0.060138992965221405, -0.016978470608592033, -0.04280732572078705, -0.001803890336304903, 0.02110075205564499, 0.023481901735067368, -0.01975480653345585, -0.05907874181866646, 0.011351269669830799, -0.03282783553004265, -0.03784455731511116, 0.08440704643726349, 0.009947293438017368, -0.03593790903687477, 0.007221128325909376, 0.010577774606645107, 0.03628086298704147, 0.056444600224494934, -0.04900459572672844, -0.0362335667014122, 0.02773623913526535, 0.038884393870830536, -0.0750504806637764, 0.036161523312330246, -0.06955567002296448, 0.053946707397699356, 0.025718264281749725, -0.05556754767894745, 0.009126594290137291, -0.031625889241695404, -0.05014587566256523, -0.00040590003482066095, 0.003788875648751855, -0.03261605277657509, 0.01839854009449482, 0.06985226273536682, -0.05853578448295593, 0.11870752274990082, 0.032638005912303925, -0.03682303428649902, 0.052511151880025864, -0.08086977899074554, 0.06580718606710434, -0.031365685164928436, 0.002035378245636821, 0.08073687553405762, -0.0047240667045116425, -0.10181401669979095, 0.02027825452387333, 0.08374345302581787, 0.0020592224318534136, -0.04294838756322861, 0.002912675030529499, -0.01862875372171402, 0.07734200358390808, 0.03588128089904785, 0.08925306797027588, 0.016936959698796272, -0.019877538084983826, -0.05294579640030861, -0.26499849557876587, 0.02175229787826538, 0.023347558453679085, 0.0011176953557878733, 0.03324896842241287, -0.01794441230595112, 0.018847782164812088, -0.012458530254662037, 0.01627175137400627, 0.04885127767920494, 0.1362956017255783, -0.022431274875998497, -0.027674106881022453, 0.04737327620387077, -0.003599676303565502, 0.028302187100052834, 0.032093681395053864, -0.004096708260476589, -0.028593312948942184, 0.0060401130467653275, 0.006067214533686638, -0.05503300204873085, -0.010701203718781471, -0.09102683514356613, 0.0364350825548172, -0.008982854895293713, 0.20390945672988892, 0.04797817021608353, 0.039680980145931244, -0.06778157502412796, 0.037117909640073776, 0.03462619706988335, -0.07538215070962906, -0.12483086436986923, 0.0015917443670332432, 0.020190991461277008, 0.013581393286585808, -0.03393268957734108, -0.0028526217211037874, 0.014218760654330254, -0.020437706261873245, 0.0031864370685070753, -0.012608579359948635, -0.09231320768594742, -0.016560494899749756, -0.03763392195105553, -0.05143693462014198, -0.010976126417517662, -0.018241262063384056, -0.00749409943819046, 0.02661021053791046, 0.005254145711660385, 0.03855564817786217, 0.02623722329735756, -0.02239210531115532, -0.04170216619968414, -0.038416653871536255, 0.022419264540076256, -0.02470446564257145, 0.04798675701022148, 0.02285897545516491, -0.004469710402190685, 0.004186902195215225, -0.052059467881917953, 0.06582681834697723, -0.00838630460202694, 0.019930394366383553, -0.031114278361201286, 0.07442087680101395, -0.009852004237473011, -0.0181542057543993, 0.03860815614461899, 0.0313691608607769, -0.004204705823212862, 0.062413595616817474, -0.0037219810765236616, 0.021578822284936905, -0.015509814023971558, -0.040429215878248215, 0.022201327607035637, 0.023926695808768272, -0.03135138377547264, 0.00007136043132049963, 0.026515083387494087, 0.012958338484168053, -0.01108342595398426, 0.018811441957950592, 0.014872602187097073, 0.011050806380808353, -0.013822473585605621, -0.02341383881866932, 0.045300815254449844, -0.05859982967376709, -0.010553407482802868, 0.03244462236762047, 0.020748157054185867, -0.292715460062027, 0.03229585662484169, -0.0016393635887652636, -0.004395783878862858, -0.022310353815555573, -0.013308754190802574, 0.040643684566020966, 0.04127827659249306, -0.03815934434533119, 0.052602604031562805, -0.0031890624668449163, 0.033663857728242874, 0.01967315934598446, 0.003041204996407032, 0.03373074159026146, 0.04318094998598099, 0.08128488063812256, -0.015387237071990967, 0.02415119670331478, -0.0695924162864685, 0.09184017032384872, 0.0035502908285707235, 0.23581360280513763, 0.0027549450751394033, 0.017654338851571083, 0.08147360384464264, -0.05989595130085945, 0.053113892674446106, 0.02414766699075699, 0.004597334191203117, -0.0029971888288855553, -0.015939336270093918, 0.060350365936756134, -0.05626372992992401, 0.01437904592603445, -0.0059688822366297245, -0.024413229897618294, 0.041585490107536316, 0.009806069545447826, -0.03230544552206993, -0.05124099180102348, -0.0058306301943957806, -0.02618442103266716, -0.03686080127954483, 0.07405204325914383, -0.09543267637491226, -0.02040254697203636, -0.035209376364946365, 0.0062762158922851086, 0.01092872116714716, -0.08718264847993851, -0.03716530278325081, -0.02677244320511818, -0.018152790144085884, 0.039895616471767426, 0.035963740199804306, 0.017508195713162422, 0.014572584070265293, -0.032829105854034424, -0.02202071249485016, -0.010169846937060356, -0.05787358433008194, 0.044164303690195084, 0.043853793293237686, 0.04420369490981102 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
Next.js can even update this static content without requiring a rebuild with a feature called [Incremental Static Regeneration, but that's outside of the scope of this tutorial. Next, we'll take a look at deploying our application on Vercel. ## Deploying your Next.js app on Vercel The final step in our tutorial today is deploying our application. We'll deploy our Next.js with MongoDB app to Vercel. I have created a GitHub repo that contains all of the code we have written today. Feel free to clone it, or create your own. Navigate to Vercel and log in. Once you are on your dashboard, click the **Import Project** button, and then **Import Git Repository**. , https://nextjs-with-mongodb-mauve.vercel.app/api/movies, and https://nextjs-with-mongodb-mauve.vercel.app/top routes.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.083499014377594, -0.023502593860030174, 0.05679013207554817, -0.06440140306949615, 0.036152176558971405, 0.02100345492362976, -0.07245520502328873, 0.00984513945877552, -0.01820792257785797, -0.045378223061561584, 0.024564048275351524, -0.052754998207092285, 0.02976970002055168, 0.005671914666891098, 0.004769859369844198, 0.03944084420800209, -0.025368478149175644, 0.030479663982987404, -0.08385515958070755, -0.016191476956009865, 0.01588539406657219, -0.008993212133646011, 0.01767813414335251, -0.022532522678375244, 0.011217625811696053, 0.0404227040708065, -0.04111657291650772, -0.006338512059301138, -0.045456141233444214, -0.21052564680576324, -0.03668935224413872, -0.10199005901813507, -0.02511521615087986, -0.02773168310523033, -0.03421016409993172, -0.005249342881143093, -0.02957078628242016, 0.04953843355178833, 0.0034782898146659136, 0.08711393922567368, 0.03363155573606491, 0.04199916869401932, -0.026201779022812843, -0.09793316572904587, -0.029794801026582718, -0.047841135412454605, -0.004781520459800959, -0.040506698191165924, 0.01513595599681139, -0.07836361229419708, 0.02792663685977459, -0.06052595376968384, -0.0022162985987961292, -0.008606591261923313, 0.012847796082496643, 0.07789015769958496, 0.03879920393228531, 0.0482843853533268, 0.03265981376171112, 0.026990994811058044, 0.06764242053031921, 0.041963379830121994, -0.1951347291469574, 0.09381891787052155, 0.059001799672842026, 0.018682245165109634, -0.03850066289305687, -0.0410299077630043, 0.06606677919626236, 0.04585099220275879, -0.027607854455709457, 0.030274882912635803, 0.010970557108521461, 0.040659841150045395, 0.025255434215068817, -0.05384742096066475, -0.02277229353785515, -0.04249881953001022, 0.021786442026495934, 0.04635808244347572, -0.02233152836561203, -0.07736724615097046, -0.04247581958770752, 0.06117140129208565, -0.01605437509715557, -0.03606174513697624, 0.0026081998366862535, -0.03862965106964111, 0.04552644118666649, 0.02344062179327011, 0.00602643471211195, -0.04065626114606857, 0.0432111918926239, 0.031879015266895294, -0.07449934631586075, -0.029582899063825607, 0.028018107637763023, 0.0003379958216100931, -0.020242944359779358, 0.22784630954265594, -0.04617391526699066, 0.03273764252662659, 0.053268060088157654, 0.0014396000187844038, 0.04477744922041893, -0.029852641746401787, -0.018108433112502098, 0.0006992361741140485, -0.025074008852243423, 0.015521344728767872, 0.014268564991652966, -0.033482298254966736, 0.04418657347559929, -0.019379427656531334, 0.031955767422914505, 0.016059618443250656, -0.016682999208569527, 0.04533515125513077, -0.038875747472047806, 0.00359753193333745, 0.03585577383637428, 0.04250306636095047, 0.043177563697099686, -0.015156185254454613, 0.05505805462598801, -0.020497459918260574, 0.04469606280326843, 0.04056161642074585, 0.023410765454173088, 0.05336935445666313, 0.029682477936148643, -0.003652701387181878, -0.06921856105327606, -0.023483887314796448, -0.011607852764427662, 0.007092222571372986, 0.006340382155030966, 0.01174837164580822, 0.006945644039660692, 0.030432239174842834, -0.019708218052983284, -0.06282787024974823, -0.013883698731660843, -0.08653983473777771, -0.04168461635708809, 0.07184281200170517, -0.009265548549592495, 0.09595833718776703, -0.015445689670741558, -0.051005665212869644, -0.009318637661635876, 0.026658795773983, -0.05528450012207031, 0.00924845039844513, -0.017097389325499535, -0.001994153019040823, 0.023981118574738503, 0.04406597092747688, -0.0315840058028698, 0.009293909184634686, -0.04395822435617447, -0.02421785518527031, -0.01176242996007204, 0.08053606003522873, 0.01685907691717148, -0.06606563925743103, 0.0053844391368329525, 0.01281813345849514, 0.023663027212023735, -0.0028768409974873066, -0.012031495571136475, 0.024558717384934425, -0.036142878234386444, 0.006991703063249588, 0.11921343952417374, 0.017334353178739548, -0.044874392449855804, 0.000372859911294654, 0.008932878263294697, 0.048736244440078735, 0.03671526536345482, -0.04004345461726189, -0.05717172473669052, 0.03091193176805973, 0.0028097212780267, -0.034665707498788834, 0.03263548016548157, -0.02749699167907238, 0.020534982904791832, 0.0363924466073513, -0.04359066113829613, 0.007152189966291189, -0.013872388750314713, -0.029897671192884445, 0.012748140841722488, -0.040178533643484116, -0.040392111986875534, 0.009052355773746967, 0.05465170368552208, -0.05578198656439781, 0.0683918446302414, 0.03977994993329048, -0.01021173782646656, -0.008786809630692005, -0.04955615475773811, 0.05096892639994621, -0.025210989639163017, -0.029863787814974785, 0.02623024769127369, 0.008189704269170761, -0.05915864184498787, 0.034864187240600586, 0.07889138162136078, 0.009064976125955582, -0.04765259474515915, 0.0028153180610388517, -0.027898969128727913, 0.011968359351158142, 0.05181045085191727, 0.0466080941259861, 0.01050600130110979, -0.028795285150408745, -0.005824004299938679, -0.26242852210998535, 0.024229593575000763, 0.028888877481222153, 0.009754551574587822, 0.02044237218797207, -0.056251659989356995, 0.020051032304763794, -0.02967633306980133, 0.009578305296599865, 0.045885104686021805, 0.08317819237709045, -0.00355685967952013, 0.027115218341350555, 0.018331659957766533, -0.011055946350097656, 0.059773415327072144, 0.06905044615268707, -0.00751737505197525, -0.03636845946311951, -0.026931338012218475, -0.02551143988966942, 0.0036941631697118282, -0.005305102560669184, -0.08803244680166245, 0.07970093190670013, -0.024057086557149887, 0.2039157897233963, 0.05832573026418686, 0.0074640787206590176, -0.09563013166189194, 0.05905270576477051, 0.003886590013280511, -0.0003794353688135743, -0.16381703317165375, 0.017213452607393265, 0.014799048192799091, 0.03272850066423416, -0.01616741716861725, -0.009436838328838348, 0.020575543865561485, -0.005088943988084793, -0.0030848002061247826, -0.015639742836356163, -0.12199122458696365, -0.016202982515096664, 0.0011083247372880578, -0.07273432612419128, -0.01573462411761284, -0.038350705057382584, 0.022546842694282532, -0.012019968591630459, 0.024516357108950615, 0.04714887589216232, 0.02201353758573532, -0.044178590178489685, -0.006803607102483511, -0.074506014585495, 0.027289438992738724, -0.019565973430871964, 0.045667558908462524, 0.009653949178755283, 0.0006188792758621275, 0.013153521344065666, -0.03209907189011574, 0.06374446302652359, -0.02232023887336254, 0.009243099950253963, -0.028743302449584007, 0.0609072782099247, -0.0418364517390728, -0.00851654727011919, 0.05481932312250137, 0.014203798957169056, 0.0013985899277031422, 0.004985202103853226, 0.06003810837864876, -0.010319271124899387, 0.012122385203838348, -0.054126907140016556, -0.01490569207817316, 0.01879165694117546, -0.0491202212870121, 0.025998752564191818, 0.04156997799873352, -0.009762781672179699, 0.00871815625578165, 0.024245601147413254, -0.016489190980792046, -0.02386709861457348, -0.00647675571963191, -0.01608169451355934, -0.0035826682578772306, -0.04695246368646622, -0.03954508900642395, 0.0317620113492012, 0.019272714853286743, -0.28665614128112793, 0.024227594956755638, 0.01013875287026167, -0.0006868716445751488, -0.014984759502112865, 0.04776011407375336, 0.03618229180574417, 0.04047492519021034, -0.0232707466930151, 0.04365957900881767, 0.01613735780119896, -0.0143277607858181, 0.04577730968594551, 0.02719714865088463, 0.0562952421605587, 0.04865310341119766, 0.06287378817796707, -0.0385885089635849, 0.02141568437218666, -0.06559180468320847, 0.04461731016635895, 0.0005104421870782971, 0.23875692486763, 0.03446909785270691, 0.002707302337512374, 0.06758386641740799, -0.01916416548192501, 0.06328106671571732, 0.02501385100185871, 0.016698352992534637, -0.014408948831260204, 0.013046666979789734, 0.08471013605594635, -0.009786440059542656, 0.035209864377975464, -0.002345049288123846, -0.051085446029901505, 0.0642315074801445, 0.020149411633610725, -0.03235628455877304, -0.04576140642166138, -0.008012489415705204, -0.03453240543603897, 0.01200023666024208, 0.0746857300400734, -0.05928881838917732, -0.04567806050181389, -0.06771493703126907, -0.0096368957310915, -0.008409322239458561, -0.03867204114794731, -0.04439409822225571, -0.02688470669090748, -0.02144704945385456, 0.05279769375920296, -0.0014564633602276444, -0.00174625008367002, 0.024883756414055824, -0.04555134102702141, 0.016872089356184006, 0.029387710615992546, -0.08211397379636765, 0.050514381378889084, 0.027774998918175697, -0.018454721197485924 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
## Putting it all together In this tutorial, we walked through the official Next.js with MongoDB example. I showed you how to connect your MongoDB database to your Next.js application and run queries in multiple ways. Then, we deployed our application using Vercel. If you have any questions or feedback, reach out through the MongoDB Community forums and let me know what you build with Next.js and MongoDB.
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.06619331985712051, 0.014232930727303028, 0.02264905348420143, -0.0738404169678688, 0.03399281948804855, 0.0009515137644484639, -0.042180582880973816, -0.000898331927601248, 0.0000301612035400467, -0.033645447343587875, -0.020732002332806587, -0.06568428874015808, 0.03513399511575699, 0.03699658811092377, -0.007938207127153873, 0.039909932762384415, -0.02353457547724247, 0.009049121290445328, -0.07483483105897903, 0.018704421818256378, 0.0117753054946661, -0.0013189633609727025, -0.025374136865139008, -0.054714616388082504, 0.0009000136633403599, 0.08707603812217712, -0.01996190845966339, -0.03594430163502693, -0.052488524466753006, -0.2033078968524933, -0.022487007081508636, -0.08591869473457336, 0.0018493199022486806, -0.04655535891652107, -0.01872825436294079, -0.00877712294459343, -0.0019666908774524927, 0.04374932125210762, 0.003655976615846157, 0.052305251359939575, 0.04688144847750664, 0.011005961336195469, -0.03876536712050438, -0.09140197932720184, -0.023027075454592705, -0.05926525220274925, -0.014496464282274246, -0.021982433274388313, 0.0068990797735750675, -0.07200027257204056, 0.00029270388768054545, -0.05647490173578262, -0.02882143296301365, -0.0012287276331335306, 0.027709921821951866, 0.0730552151799202, 0.02588033676147461, 0.03156166523694992, -0.008014136925339699, 0.023876601830124855, 0.058224670588970184, 0.01704420894384384, -0.18720759451389313, 0.09620968252420425, 0.03767107427120209, 0.03958465903997421, -0.04874527081847191, -0.015375642105937004, 0.02385883592069149, 0.04188714921474457, -0.027655526995658875, 0.015640810132026672, 0.03520669788122177, 0.040953125804662704, 0.013289138674736023, -0.03989461064338684, -0.018426647409796715, -0.06375672668218613, 0.037298381328582764, 0.012164956890046597, -0.030459968373179436, -0.05042935535311699, -0.015089544467628002, 0.032943908125162125, -0.022030167281627655, -0.008628047071397305, -0.010882753878831863, -0.06047669053077698, -0.003208102658390999, 0.028869779780507088, -0.009634045884013176, -0.030302567407488823, 0.02516706846654415, 0.01822884939610958, -0.06097341701388359, 0.005499366670846939, 0.033752527087926865, 0.0017339494079351425, -0.007094011176377535, 0.2222183495759964, -0.05671984329819679, 0.0488932728767395, 0.04911171272397041, -0.0082322396337986, 0.02659333311021328, -0.020251603797078133, -0.026414474472403526, -0.03290966525673866, 0.007541109807789326, 0.0025844930205494165, 0.012837795540690422, -0.05685194954276085, 0.0352904312312603, -0.043844182044267654, 0.020374296233057976, -0.005334570072591305, -0.005806151777505875, 0.021456988528370857, -0.012727906927466393, 0.008274138905107975, 0.03752788528800011, 0.057753778994083405, 0.040929265320301056, 0.021700790151953697, 0.08114597201347351, -0.03332730382680893, 0.04530087485909462, 0.061978138983249664, 0.007315970957279205, 0.06319564580917358, 0.04337179288268089, -0.00892848800867796, -0.08696910738945007, -0.019958533346652985, 0.021538469940423965, 0.009678122587502003, -0.01757700741291046, 0.0044132424518466, 0.05948709324002266, 0.030618002638220787, -0.0012754451017826796, -0.06318725645542145, -0.019664395600557327, -0.10452309995889664, -0.039961107075214386, 0.06816606223583221, -0.015547082759439945, 0.08733538538217545, -0.07039500027894974, -0.04216538369655609, -0.0029019892681390047, 0.05993807688355446, -0.047726329416036606, 0.007912524975836277, -0.010448959656059742, 0.015126114711165428, 0.04166286438703537, 0.04236928001046181, -0.03333170711994171, -0.01057454477995634, -0.05291202291846275, 0.012756546959280968, 0.0060446616262197495, 0.07728243619203568, 0.00959019549190998, -0.13630448281764984, 0.007611942943185568, 0.020449135452508926, 0.030378643423318863, -0.058863565325737, 0.0018927991623058915, -0.0022553186863660812, -0.07135453820228577, 0.0015452546067535877, 0.10901858657598495, 0.015928082168102264, -0.052733201533555984, 0.004428913351148367, -0.021099533885717392, 0.023252952843904495, 0.027533911168575287, -0.014037278480827808, -0.0589289627969265, 0.04508086293935776, 0.0021971804089844227, -0.04771023243665695, 0.01830758899450302, -0.042712803930044174, 0.041330549865961075, 0.04326198622584343, -0.008130757138133049, -0.01297071948647499, -0.007193125784397125, -0.016928818076848984, -0.006645637098699808, -0.062329020351171494, -0.02304822765290737, -0.039023831486701965, 0.026641689240932465, -0.06444104015827179, 0.10734450817108154, 0.03509008139371872, 0.0075988927856087685, 0.062461696565151215, -0.012354209087789059, 0.048344966024160385, -0.012780848890542984, -0.02597566694021225, 0.02665802836418152, 0.0024304459802806377, -0.05566053092479706, 0.02636718563735485, 0.06250421702861786, -0.006296473555266857, -0.045018356293439865, -0.001879955641925335, 0.009914684109389782, 0.057000286877155304, 0.040971867740154266, 0.06389133632183075, 0.017871107906103134, -0.06372950226068497, -0.02015634998679161, -0.25661733746528625, 0.010066758841276169, 0.010321494191884995, 0.0015491093508899212, 0.008688291534781456, -0.032409194856882095, 0.023891711607575417, -0.019351914525032043, -0.03883282095193863, 0.07246313244104385, 0.08905725181102753, -0.015210568904876709, 0.06035393476486206, 0.01193722989410162, -0.02334967441856861, 0.05516434088349342, 0.07195422798395157, 0.0015938582364469767, -0.030033020302653313, -0.000919058860745281, -0.005491212941706181, -0.020967038348317146, -0.002119272481650114, -0.1070018857717514, 0.04225859045982361, 0.01454435009509325, 0.19054940342903137, 0.0656440332531929, -0.010257578454911709, -0.0822170153260231, 0.0836707204580307, -0.027092916890978813, -0.02456533908843994, -0.11465056985616684, 0.02347271330654621, -0.010627670213580132, 0.04259095713496208, 0.0026909851003438234, -0.015543169341981411, -0.012187895365059376, -0.061499372124671936, 0.019338950514793396, 0.020492427051067352, -0.10693731904029846, -0.01561203133314848, -0.024792682379484177, -0.04735342785716057, -0.01716933771967888, -0.05184878036379814, 0.03429429605603218, -0.021154286339879036, 0.05054210498929024, 0.05611260607838631, 0.022472672164440155, -0.040473572909832, -0.0019381856545805931, -0.08599470555782318, -0.004992215428501368, -0.02681419812142849, 0.06709257513284683, 0.010709449648857117, -0.018410291522741318, 0.006386980414390564, -0.0341477133333683, 0.0659918561577797, 0.008831665851175785, -0.010742248967289925, -0.032379407435655594, 0.034339748322963715, -0.056879717856645584, -0.010550071485340595, 0.047277044504880905, 0.01062469370663166, 0.03982025384902954, 0.03579835593700409, 0.0684766173362732, 0.016480697318911552, -0.0065765175968408585, -0.017656195908784866, 0.0033735933247953653, 0.04252775385975838, -0.03355226665735245, 0.030460428446531296, 0.02673894166946411, 0.013273265212774277, 0.02289057895541191, 0.07571686804294586, 0.010830312967300415, 0.019254567101597786, -0.003972410690039396, -0.060752611607313156, -0.025499217212200165, -0.0379958376288414, -0.02306763269007206, -0.012480003759264946, 0.0033242881763726473, -0.2777700126171112, 0.015423208475112915, -0.01163348276168108, 0.02157033048570156, -0.010626251809298992, 0.0388944186270237, 0.04687231034040451, 0.023875650018453598, -0.005147178191691637, 0.03346642479300499, 0.03915654495358467, 0.014396410435438156, 0.03884773328900337, 0.011107029393315315, 0.029563963413238525, 0.0610232800245285, 0.03942348062992096, -0.05142892897129059, 0.019215261563658714, -0.02962462604045868, 0.059897635132074356, 0.047562018036842346, 0.22706404328346252, 0.025487449020147324, 0.0024462821893393993, 0.0913454219698906, -0.02538413368165493, 0.0453312024474144, 0.027598753571510315, 0.03493056073784828, -0.01903444528579712, 0.024813979864120483, 0.10332325845956802, -0.05249018594622612, 0.018983108922839165, 0.030056290328502655, -0.05401482433080673, 0.0625142976641655, 0.037092216312885284, -0.038153041154146194, -0.03100467473268509, 0.011797798797488213, -0.009922077879309654, 0.01315637119114399, 0.07807599008083344, -0.05831718072295189, -0.04543394222855568, -0.06648843735456467, 0.028524266555905342, -0.0037943965289741755, -0.044559579342603683, -0.07478038221597672, -0.01981644332408905, -0.02440739795565605, 0.01722138561308384, 0.005822524428367615, 0.00669501768425107, 0.01578783243894577, -0.03534403443336487, -0.017502320930361748, 0.04352748394012451, -0.08838141709566116, 0.018391979858279228, -0.005393589846789837, 0.017667213454842567 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
[1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt572f8888407a2777/65de06fac7f05b1b2f8674cc/vercel-homepage.png [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt833e93bc334716a5/65de07c677ae451d96b0ec98/server-error.png [3]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltad2329fe1bb44d8f/65de1b020f1d350dd5ca42a5/database-deployments.png
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.07197485119104385, -0.04556358978152275, 0.0635908991098404, -0.044109322130680084, 0.041805122047662735, 0.005983847193419933, -0.024220671504735947, 0.008180590346455574, 0.00440394040197134, -0.02306322567164898, 0.04248539358377457, -0.09223457425832748, 0.03795583173632622, 0.032974712550640106, -0.007483603898435831, 0.045194607228040695, -0.010135126300156116, 0.022245850414037704, -0.04889865219593048, 0.03693704307079315, 0.022426016628742218, -0.022829225286841393, -0.0011698231101036072, -0.06258617341518402, 0.0029567645397037268, 0.027060724794864655, -0.020086189731955528, -0.01687084138393402, -0.08257517963647842, -0.18501554429531097, -0.014474298804998398, -0.06916072219610214, 0.005818811245262623, -0.061428796499967575, 0.02910437434911728, -0.0363638773560524, -0.027854882180690765, 0.056303270161151886, -0.0014902438269928098, 0.017232390120625496, 0.0441972017288208, -0.014266431331634521, -0.04144769534468651, -0.05068446323275566, -0.016719847917556763, -0.0758284404873848, 0.0009950939565896988, -0.018594807013869286, 0.05143290013074875, -0.03824811801314354, 0.030995357781648636, 0.003555882256478071, 0.015172968618571758, 0.03351815789937973, 0.004745251964777708, 0.0366806760430336, 0.08352242410182953, 0.06281159073114395, 0.00988017302006483, 0.04778730496764183, 0.060379378497600555, 0.05064375698566437, -0.2462957352399826, 0.08368132263422012, 0.03568949177861214, -0.0034569210838526487, -0.014577782712876797, -0.007341078948229551, 0.019815770909190178, 0.004381154198199511, -0.02740616910159588, 0.03857273608446121, 0.028286028653383255, 0.06709833443164825, -0.01173422858119011, -0.025462975725531578, -0.008335212245583534, -0.018695315346121788, -0.0062355040572583675, -0.010711572133004665, 0.0149046266451478, -0.01854676380753517, -0.019900215789675713, 0.007045482750982046, -0.03528602048754692, -0.030333075672388077, -0.011325531639158726, -0.023751145228743553, 0.049715805798769, 0.002472868887707591, -0.005860500503331423, -0.016773169860243797, 0.046705957502126694, 0.010273860767483711, -0.08423975855112076, 0.0021511870436370373, 0.0034765200689435005, 0.007211355492472649, -0.04961641877889633, 0.22341464459896088, -0.035687051713466644, 0.014399276115000248, 0.07163004577159882, -0.011164391413331032, 0.022388450801372528, -0.02023310400545597, -0.04881921038031578, -0.023189233615994453, -0.036169540137052536, 0.02047247812151909, -0.014988255687057972, -0.018781030550599098, 0.05741126462817192, -0.027376286685466766, 0.0021807539742439985, 0.015808193013072014, 0.024557331576943398, -0.0007360817980952561, -0.05297263339161873, -0.009975844994187355, -0.00014425576955545694, 0.035745058208703995, 0.05362321808934212, -0.021564165130257607, 0.06431949883699417, -0.03186892718076706, 0.05999419838190079, 0.09428268671035767, 0.0481245219707489, 0.06639514863491058, 0.009652050212025642, 0.008348148316144943, -0.032644666731357574, -0.04656142368912697, -0.021794501692056656, -0.025336209684610367, 0.013133049011230469, 0.0018389897886663675, 0.039832573384046555, -0.018569832667708397, -0.006973831448704004, -0.14246948063373566, -0.014058971777558327, -0.06378772109746933, -0.013843564316630363, 0.09554652124643326, 0.01353142224252224, 0.052145473659038544, -0.03991999477148056, -0.024316783994436264, -0.02753300778567791, 0.06044970452785492, 0.00458831200376153, 0.04512225463986397, 0.023948442190885544, 0.052512429654598236, 0.02123412862420082, 0.04846186935901642, -0.05122639983892441, -0.03187329322099686, 0.026729267090559006, -0.05966341122984886, -0.04953338950872421, 0.11899743974208832, 0.020800797268748283, -0.09892091900110245, -0.021617136895656586, 0.004335971549153328, -0.0042019737884402275, -0.0035183264408260584, -0.04012797027826309, -0.004134654998779297, -0.04560869187116623, -0.007000535726547241, 0.06303741037845612, 0.017599409446120262, -0.005986894015222788, 0.006467308383435011, 0.008449449203908443, 0.0193400327116251, 0.02495855838060379, -0.042079322040081024, -0.03772817179560661, 0.052492763847112656, 0.017001748085021973, -0.05637170746922493, 0.0363280363380909, -0.03578704968094826, 0.06303328275680542, 0.04247420281171799, -0.03415631875395775, -0.023129817098379135, -0.03163893520832062, -0.050993189215660095, -0.03194454684853554, -0.0455658882856369, -0.03792588412761688, -0.024809455499053, 0.01248195581138134, -0.05605043098330498, 0.1305750012397766, -0.0029936344362795353, -0.030623197555541992, 0.04031753912568092, -0.028883259743452072, 0.03330599144101143, -0.03274323046207428, 0.002783400472253561, -0.024228110909461975, 0.021169355139136314, -0.038140300661325455, 0.02383839339017868, 0.029500329867005348, 0.02019304223358631, 0.000421028962591663, -0.0036103592719882727, 0.021823067218065262, 0.08606430143117905, 0.03756168857216835, 0.07178611308336258, 0.06328613311052322, -0.04727848246693611, -0.08375178277492523, -0.21817287802696228, -0.011700103059411049, -0.008920648135244846, -0.06727389991283417, -0.01065643411129713, 0.01560406107455492, 0.0268882866948843, -0.007119838614016771, 0.01818937435746193, 0.050195079296827316, 0.0856243446469307, -0.0218086838722229, 0.013072612695395947, -0.028791168704628944, -0.022477488964796066, 0.011521667242050171, 0.019162649288773537, 0.0003354827349539846, -0.054486680775880814, -0.06726989150047302, -0.049790311604738235, -0.02481461502611637, -0.0012754290364682674, -0.0658264234662056, 0.07724545896053314, -0.019832558929920197, 0.20658709108829498, 0.06074430048465729, 0.005456607788801193, -0.0723838210105896, 0.04225742444396019, 0.05042320862412453, -0.02006993629038334, -0.12185158580541611, 0.0838264748454094, 0.0335969552397728, 0.05442897230386734, -0.0048479135148227215, 0.003528799396008253, -0.029917338863015175, -0.02399108000099659, 0.029085133224725723, -0.009716532193124294, -0.06025950610637665, -0.008586389012634754, -0.010049032047390938, -0.04320603236556053, 0.023610027506947517, -0.06696879118680954, 0.013674385845661163, 0.03811929374933243, 0.013895481824874878, 0.026557736098766327, 0.04440253973007202, 0.025199171155691147, 0.002474998589605093, -0.10868249088525772, 0.005183112807571888, -0.007042411249130964, 0.04922934249043465, 0.018950050696730614, -0.029487937688827515, 0.016521843150258064, -0.058504700660705566, 0.0793992429971695, -0.013567455112934113, -0.01779993623495102, -0.037885069847106934, 0.06974063813686371, -0.04577171057462692, -0.03180161491036415, 0.1069645881652832, 0.015232348814606667, -0.026400413364171982, 0.046238746494054794, 0.04761335998773575, -0.00920842494815588, -0.01422122959047556, -0.002921163570135832, -0.04545968398451805, 0.039202138781547546, -0.030570602044463158, 0.03309823200106621, 0.012626309879124165, 0.003506026929244399, 0.02200004830956459, 0.01054287701845169, 0.018239358440041542, 0.04913341626524925, -0.01917361468076706, -0.019582202658057213, -0.025678064674139023, -0.03992224484682083, -0.009976857341825962, 0.038363631814718246, 0.005320393946021795, -0.29622960090637207, 0.07066739350557327, 0.01728314906358719, 0.030815815553069115, -0.024093830958008766, 0.042290519922971725, -0.007208832073956728, 0.046039801090955734, -0.029814820736646652, -0.01547415554523468, 0.04099785163998604, -0.027148809283971786, 0.047955770045518875, -0.014928292483091354, 0.011756906285881996, 0.05591565743088722, 0.026406794786453247, -0.05236240103840828, 0.0176374688744545, -0.05088043957948685, 0.013238094747066498, 0.017720729112625122, 0.20903971791267395, -0.018834827467799187, -0.031606338918209076, -0.0006057684076949954, -0.013010716997087002, 0.0209085363894701, 0.00009744796989252791, 0.041121046990156174, -0.026885243132710457, 0.030237000435590744, 0.06967350840568542, -0.02844393067061901, 0.025874437764286995, 0.05294041335582733, -0.040785230696201324, -0.00862810853868723, 0.016063226386904716, -0.029634574428200722, -0.03878431394696236, 0.011308999732136726, -0.0242326557636261, 0.014434276148676872, 0.08907820284366608, -0.06080567091703415, -0.0015447322512045503, -0.06215273216366768, 0.0632581114768982, -0.006995389703661203, -0.04689699038863182, -0.018986409530043602, -0.050603967159986496, 0.028781281784176826, 0.030272290110588074, -0.013120039366185665, 0.0061251395381987095, -0.023276835680007935, -0.04207910597324371, 0.003962793853133917, 0.04796580597758293, -0.08699949085712433, 0.06333428621292114, 0.015056569129228592, 0.023908844217658043 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
[4]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt798b7c3fe361ccbd/65de1b917c85267d37234400/welcome-nextjs.png [5]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blta204dc4bce246ac6/65de1ff8c7f05b0b4b86759a/json-format.png [6]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt955fc3246045aa82/65de2049330e0026817f6094/top-20-movies.png
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.09084164351224899, -0.02250589244067669, 0.03162126615643501, -0.06294838339090347, 0.06777750700712204, 0.026305779814720154, -0.01418217271566391, 0.00885816104710102, -0.006892760284245014, -0.05282166600227356, 0.019261617213487625, -0.08013585954904556, 0.014574258588254452, 0.028335604816675186, 0.00002631653842399828, 0.012094012461602688, 0.03158601000905037, -0.021733438596129417, -0.09405582398176193, 0.02894728071987629, 0.04903663322329521, -0.020964203402400017, 0.028690308332443237, -0.11169685423374176, 0.018369799479842186, 0.02970213070511818, -0.006938199512660503, 0.0013458376051858068, -0.060231540352106094, -0.16958223283290863, -0.021813591942191124, -0.08724585920572281, 0.0136875556781888, -0.02431337721645832, -0.055522847920656204, -0.04369492456316948, -0.03139469772577286, 0.05582832545042038, -0.02453528717160225, 0.06122596934437752, 0.00825528521090746, -0.017940638586878777, -0.013333606533706188, -0.07248925417661667, -0.06740976125001907, -0.052947159856557846, -0.01513213012367487, -0.015026450157165527, 0.028941338881850243, -0.05195583403110504, 0.025165487080812454, -0.05185611918568611, -0.002965426305308938, 0.009000508114695549, -0.021286780014634132, 0.012153208255767822, 0.04065592586994171, 0.018218770623207092, 0.020670900121331215, 0.027357343584299088, 0.03740096837282181, 0.044805485755205154, -0.2052326500415802, 0.09768287092447281, 0.0540841706097126, 0.0019991579465568066, -0.0242196973413229, 0.0018713338067755103, 0.008816704154014587, 0.05012468993663788, -0.07747955620288849, 0.031101373955607414, 0.016312461346387863, 0.012391406111419201, -0.019125256687402725, -0.032188255339860916, -0.01233314722776413, -0.0451977476477623, -0.0028264618013054132, -0.02564125880599022, -0.004699885379523039, -0.01140954252332449, -0.01840207725763321, 0.014375412836670876, -0.035350725054740906, 0.002069677459076047, -0.017517874017357826, -0.058529265224933624, 0.031363580375909805, 0.02841245010495186, -0.032356757670640945, 0.003360816976055503, -0.02237194962799549, 0.04266515001654625, -0.08451931923627853, -0.015351652167737484, 0.06255139410495758, -0.004689451772719622, -0.009293517097830772, 0.1956944763660431, -0.052793700248003006, 0.013752351514995098, 0.09566619992256165, -0.0020390755962580442, 0.027627645060420036, -0.03370915353298187, -0.00610435102134943, -0.01602809503674507, 0.0289971474558115, 0.012286198325455189, -0.007265801075845957, -0.05647774785757065, 0.058576878160238266, -0.03576098382472992, 0.04830315709114075, -0.042546190321445465, 0.009371287189424038, 0.036496300250291824, -0.007062665652483702, -0.03997822105884552, 0.03381141275167465, 0.025053929537534714, 0.00464627193287015, -0.047508593648672104, 0.014356021769344807, -0.059714704751968384, 0.056485533714294434, 0.08298715204000473, 0.05781219154596329, 0.03720373660326004, 0.06299349665641785, 0.009765231981873512, -0.013023247011005878, 0.0222502239048481, -0.04826347157359123, 0.033635664731264114, 0.013143396936357021, -0.022136928513646126, 0.026415392756462097, -0.042722415179014206, 0.0030818304512649775, -0.12327948212623596, -0.04702737182378769, -0.1007363498210907, -0.017235439270734787, 0.08490269631147385, -0.027435485273599625, 0.06060464307665825, -0.06035248190164566, 0.021862799301743507, -0.0016568503342568874, 0.07955136895179749, -0.044467851519584656, 0.015981106087565422, -0.005752646829932928, -0.023136263713240623, 0.06546696275472641, 0.05190186947584152, -0.018658509477972984, 0.037148308008909225, -0.022961698472499847, -0.06567980349063873, -0.02781393937766552, 0.07262828201055527, 0.03154096007347107, -0.0761844664812088, 0.0008385819382965565, 0.021065611392259598, 0.0011004246771335602, -0.054550789296627045, -0.041211098432540894, 0.024744030088186264, -0.07329347729682922, 0.01942785456776619, 0.11719291657209396, 0.01770091988146305, -0.02909044921398163, -0.00904623419046402, -0.01200096309185028, 0.0313093401491642, 0.022769015282392502, -0.033987417817115784, -0.08128012716770172, 0.036170393228530884, 0.03636811673641205, -0.027531400322914124, 0.030367081984877586, -0.08473721146583557, 0.0651765689253807, 0.04663800075650215, -0.0023306861985474825, 0.014207176864147186, -0.04514896869659424, -0.008382047526538372, -0.001720175612717867, -0.02350764349102974, -0.04354112222790718, -0.026615675538778305, 0.0020012627355754375, -0.03336459770798683, 0.06831436604261398, 0.001609482103958726, -0.020135434344410896, 0.025010742247104645, -0.02955389954149723, 0.03724665567278862, 0.038790687918663025, -0.034472499042749405, 0.057610005140304565, 0.03205837681889534, -0.07907548546791077, 0.013615414500236511, 0.058711256831884384, -0.0052873981185257435, -0.02544817328453064, -0.01270532887428999, 0.0032564750872552395, 0.06258834898471832, 0.031818658113479614, 0.031505290418863297, 0.024180131033062935, -0.07132604718208313, -0.0700136348605156, -0.24240446090698242, 0.05457505211234093, -0.01137678511440754, -0.02711692452430725, 0.011724493466317654, -0.04497542232275009, 0.006776139140129089, 0.003826411906629801, 0.0640348419547081, 0.06502021104097366, 0.09748335927724838, -0.003235599957406521, 0.00519938999786973, -0.008979146368801594, 0.020784584805369377, 0.040899910032749176, 0.04973448067903519, 0.003207074711099267, 0.01450504269450903, -0.0032309400849044323, -0.03399713337421417, -0.015634765848517418, 0.005222299601882696, -0.06414700299501419, 0.04274798929691315, 0.001497643650509417, 0.21191556751728058, 0.09330900013446808, 0.0007557770586572587, -0.030224964022636414, 0.06515525281429291, 0.06505109369754791, -0.053307224065065384, -0.06571251153945923, 0.05754492059350014, 0.022662410512566566, 0.04481362923979759, 0.001925715827383101, -0.04751693457365036, -0.019954809918999672, 0.015472089871764183, 0.005824398715049028, -0.006665098015218973, -0.0673501119017601, -0.03785718232393265, -0.054681092500686646, -0.07179644703865051, 0.04919607564806938, -0.00953415036201477, 0.016158562153577805, 0.02507493831217289, -0.004068941809237003, 0.0024172100238502026, -0.010021188296377659, -0.007701448630541563, -0.04224283993244171, -0.03359724208712578, 0.0009793685749173164, -0.015441310591995716, 0.08375880867242813, -0.03871242702007294, -0.058988090604543686, 0.004952840972691774, -0.058068640530109406, 0.018239520490169525, 0.011069728061556816, -0.01936221867799759, 0.007676766719669104, 0.01396108977496624, -0.041562337428331375, -0.02151302993297577, 0.04795118421316147, 0.01901603303849697, 0.01156337559223175, 0.059669043868780136, 0.04943621903657913, 0.026397671550512314, 0.018684452399611473, 0.006075779441744089, -0.03143692389130592, 0.04942358657717705, 0.006521150004118681, 0.00765528529882431, -0.02126220613718033, 0.03111102059483528, 0.020833171904087067, 0.008813283406198025, -0.041752591729164124, 0.003179146908223629, -0.043900735676288605, 0.027140727266669273, 0.0070288837887346745, -0.05424760654568672, -0.02752317488193512, 0.04419085755944252, 0.012945081107318401, -0.3150137960910797, 0.043746769428253174, 0.013173537328839302, 0.012771324254572392, -0.03203098475933075, 0.030091766268014908, 0.03314201161265373, 0.0071321153081953526, -0.049703992903232574, 0.04345830902457237, -0.013598187826573849, 0.041685838252305984, 0.06550414115190506, -0.02870047278702259, -0.01803749054670334, 0.06326570361852646, 0.05746878311038017, -0.03320809453725815, 0.04822544753551483, -0.025027096271514893, 0.010404030792415142, 0.02838573232293129, 0.24687397480010986, -0.013684275560081005, -0.02742709591984749, 0.050003018230199814, -0.027236515656113625, 0.0647844523191452, 0.027704061940312386, -0.015582517720758915, 0.049234889447689056, 0.03262685611844063, 0.06198352947831154, -0.024035047739744186, 0.030651763081550598, 0.020371152088046074, -0.05058267340064049, 0.006764373742043972, 0.05046136677265167, -0.03535892814397812, -0.045663993805646896, -0.00867390539497137, -0.004985824227333069, -0.019974637776613235, 0.11975574493408203, -0.0166843980550766, -0.00048142822925001383, -0.017131047323346138, 0.032885339111089706, 0.007043109275400639, -0.03737758472561836, -0.022841639816761017, 0.00074231211328879, -0.0103503642603755, 0.024353818967938423, 0.04647650197148323, 0.00007605669816257432, -0.00870510097593069, -0.007755495607852936, 0.02307741716504097, 0.019360853359103203, -0.055499643087387085, 0.0005388050340116024, 0.028552483767271042, 0.026957804337143898 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
[7]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltfb7866c7c87e81ef/65de2098ae62f777124be71d/top-1000-movie.png [8]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/bltc89beb7757ffec1e/65de20e0ee3a13755fc8e7fc/importing-project-vercel.png [9]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt0022681a81165d94/65de21086c65d7d78887b5ff/configuring-project.png
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.05935702472925186, -0.03701744228601456, 0.022441182285547256, -0.08058218657970428, 0.04208818078041077, 0.009208179078996181, -0.020943015813827515, 0.0019184109987691045, -0.02465016394853592, -0.013017919845879078, 0.028959419578313828, -0.10566168278455734, 0.057245008647441864, 0.03945599123835564, -0.021978087723255157, 0.008655349723994732, 0.02267620898783207, 0.01967579312622547, -0.078084297478199, 0.0269402414560318, 0.0642908439040184, -0.014440133236348629, 0.021634666249155998, -0.07343229651451111, 0.022720180451869965, 0.0040785204619169235, -0.015048302710056305, -0.04452573508024216, -0.034387316554784775, -0.20131465792655945, -0.02663153037428856, -0.05154629796743393, 0.04052084684371948, -0.0033232790883630514, -0.008716755546629429, -0.026596205309033394, -0.03739718720316887, 0.03078204020857811, -0.006961221806704998, 0.0008473893394693732, 0.04976855218410492, -0.0006486655911430717, -0.006615742109715939, -0.06124522536993027, -0.05372307077050209, -0.04420287534594536, -0.002748789731413126, -0.012309538200497627, 0.03782690316438675, -0.057440511882305145, 0.04486097767949104, -0.04094123840332031, 0.04929013177752495, 0.03370852768421173, -0.04164567217230797, 0.05361047387123108, 0.051880840212106705, 0.019222700968384743, 0.055757082998752594, 0.022960340604186058, 0.06554718315601349, 0.031983692198991776, -0.24377760291099548, 0.0819278210401535, 0.07194944471120834, 0.009742943570017815, -0.03391273692250252, 0.008162098936736584, 0.007374322973191738, 0.04085773974657059, -0.07253513485193253, 0.0569985993206501, 0.0347549207508564, 0.046423837542533875, 0.002168135019019246, -0.02603004314005375, -0.015536046586930752, -0.00607504416257143, -0.010689720511436462, 0.003929197322577238, 0.0279020294547081, -0.00004177099617663771, -0.060098566114902496, 0.01653662510216236, 0.010224579833447933, 0.002480252180248499, 0.019390681758522987, -0.03238222748041153, 0.04002762585878372, -0.004658335819840431, -0.01619626209139824, -0.061799317598342896, -0.017139185220003128, 0.037331774830818176, -0.06091032177209854, 0.004579830914735794, 0.05052918195724487, -0.01989634521305561, -0.024466492235660553, 0.2216966301202774, -0.044066719710826874, -0.024387838318943977, 0.09793107211589813, -0.0013582499232143164, 0.03156652674078941, -0.03386466205120087, -0.06461814790964127, -0.005488187540322542, -0.018437368795275688, 0.014982649125158787, -0.013240951113402843, -0.01957070454955101, 0.062363214790821075, -0.02779524214565754, 0.03641849011182785, -0.010465268976986408, 0.009290377609431744, 0.014579040929675102, -0.03980622813105583, -0.011738994158804417, 0.0023083025589585304, 0.013391610234975815, 0.01935013011097908, -0.024141693487763405, 0.020530473440885544, -0.03180773928761482, 0.048622891306877136, 0.0819571316242218, 0.04861072078347206, 0.05764668807387352, 0.03826630860567093, -0.010776206851005554, -0.05247817188501358, -0.029231945052742958, -0.031404975801706314, 0.012787435203790665, 0.016042908653616905, 0.013063163496553898, 0.011572033166885376, -0.061412978917360306, -0.03640829771757126, -0.0630606859922409, 0.017647959291934967, -0.07045686990022659, -0.013717246241867542, 0.11173242330551147, -0.017079444602131844, 0.04534468427300453, -0.03886334225535393, -0.010015808045864105, -0.018072042614221573, 0.03941993787884712, -0.035863664001226425, 0.0223129540681839, 0.014940259978175163, 0.006767916958779097, 0.03669808432459831, 0.0595911405980587, -0.03877795487642288, 0.013867788016796112, 0.0047555710189044476, -0.0564403235912323, -0.044789329171180725, 0.09921856969594955, 0.05162176489830017, -0.11661951243877411, -0.007648878265172243, -0.0035705482587218285, -0.005658805835992098, -0.012053408659994602, -0.03377716615796089, 0.00847071036696434, -0.0335119366645813, 0.0409710556268692, 0.12250745296478271, 0.006676353979855776, -0.04107765853404999, 0.0016999879153445363, 0.007809426635503769, 0.007084325421601534, 0.03136445954442024, -0.05943487212061882, -0.06573476642370224, 0.0319274440407753, 0.03848639503121376, -0.06661751866340637, 0.02051738277077675, -0.03890369087457657, 0.040245380252599716, 0.05172240361571312, -0.027827369049191475, 0.05844378471374512, -0.01919151097536087, -0.008408097550272942, -0.04290620610117912, -0.007780995685607195, -0.02388007752597332, 0.010527904145419598, 0.009995282627642155, -0.028186563402414322, 0.09261078387498856, 0.016087975353002548, -0.0416405126452446, 0.05355391651391983, -0.035770829766988754, 0.05782916769385338, -0.00883936695754528, -0.055548470467329025, 0.02307453379034996, 0.029811587184667587, -0.0700858011841774, 0.01561257429420948, 0.06997731328010559, 0.031489696353673935, -0.041921213269233704, -0.005257290787994862, -0.010979169979691505, 0.04115165397524834, 0.06193550303578377, 0.06628002226352692, 0.04901197925209999, -0.08003707975149155, -0.07479579746723175, -0.2579028904438019, 0.019175935536623, -0.014439643360674381, -0.038242731243371964, -0.0012221853248775005, -0.03448311239480972, 0.006287381984293461, -0.03734900429844856, 0.06295999884605408, 0.07746871560811996, 0.08844023942947388, -0.030663184821605682, -0.039670009166002274, -0.008479157462716103, -0.01899264194071293, 0.0022913767024874687, 0.016329830512404442, 0.0053237248212099075, -0.017841508612036705, -0.030842658132314682, -0.04040120914578438, -0.028667761012911797, -0.04285518452525139, -0.06384782493114471, 0.0480070561170578, -0.03168359771370888, 0.19945119321346283, 0.07866456359624863, -0.008954985067248344, -0.03153872862458229, 0.05272785574197769, 0.06807240843772888, -0.04611741006374359, -0.13411709666252136, 0.052382566034793854, -0.01886088214814663, 0.04704105108976364, 0.011615621857345104, -0.0035251821391284466, -0.037903595715761185, -0.0019628102891147137, 0.0098404036834836, -0.004753624554723501, -0.079256072640419, 0.01644968055188656, 0.0033167593646794558, -0.04976325109601021, 0.027959175407886505, -0.04260486364364624, 0.03010483831167221, 0.018700215965509415, 0.0030764522962272167, -0.004514666274189949, 0.021867889910936356, -0.011359219439327717, -0.018181417137384415, -0.048128124326467514, 0.008399042300879955, -0.008712626993656158, 0.060659464448690414, -0.004572036676108837, -0.014042722061276436, 0.0305442176759243, -0.0338875912129879, 0.0427418015897274, -0.03464905545115471, 0.0007342224125750363, -0.04453586786985397, 0.04224874824285507, -0.009011668153107166, -0.015000328421592712, 0.07269876450300217, 0.007310077082365751, 0.007358919363468885, 0.07344062626361847, 0.08734703063964844, 0.017693672329187393, 0.03348497673869133, 0.00590291153639555, -0.03997606784105301, 0.04414638504385948, 0.0012327629374340177, -0.008502751588821411, 0.02268095687031746, 0.01503752637654543, -0.00969753973186016, 0.028390448540449142, -0.02082190476357937, 0.01784343831241131, 0.014952627941966057, 0.035151124000549316, -0.04990532994270325, 0.005985195282846689, 0.03122677467763424, 0.03960555046796799, -0.005386607255786657, -0.3002777397632599, 0.04680084437131882, -0.0010664527071639895, 0.0353277251124382, -0.04218347743153572, 0.02810247614979744, 0.021174458786845207, 0.0031468665692955256, -0.001576547627337277, 0.00923940073698759, 0.024021601304411888, 0.008853326551616192, 0.06618943810462952, -0.002826081356033683, 0.0010573777835816145, 0.012610617093741894, 0.07198385894298553, -0.018321802839636803, 0.057700369507074356, -0.018868422135710716, -0.01984034851193428, -0.008163086138665676, 0.2197021245956421, -0.012082764878869057, -0.017646297812461853, 0.008303599432110786, -0.0631830021739006, 0.01330778282135725, 0.007773225661367178, 0.004785777069628239, 0.017493324354290962, 0.03062937781214714, 0.05476854369044304, -0.03388093411922455, 0.009788280352950096, 0.03659573942422867, -0.041450079530477524, 0.028439335525035858, 0.0447637140750885, -0.01775992661714554, -0.0541558600962162, 0.010199873708188534, -0.058673739433288574, -0.03674396127462387, 0.06569188088178635, -0.0850425735116005, -0.003041539341211319, -0.04379893094301224, -0.0008766394457779825, -0.022083258256316185, -0.06950227916240692, -0.012750200927257538, -0.019401373341679573, 0.016446402296423912, 0.01974710449576378, 0.009637693874537945, 0.004260492976754904, 0.0019454173743724823, -0.018940214067697525, -0.033098094165325165, 0.013692153617739677, -0.06136311590671539, 0.05115564540028572, 0.04988112300634384, 0.023104898631572723 ]
devcenter
https://www.mongodb.com/developer/languages/javascript/nextjs-with-mongodb
created
[10]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt7b00b1cfe190a7d4/65de212ac5985207f8f6b232/congratulations.png
md
{ "tags": [ "JavaScript", "Next.js" ], "pageDescription": "Learn how to easily integrate MongoDB into your Next.js application with the official MongoDB package.", "contentType": "Tutorial" }
How to Integrate MongoDB Into Your Next.js App
2024-05-20T17:32:23.500Z
[ -0.05522237718105316, 0.027641287073493004, 0.028337405994534492, -0.030491236597299576, 0.0032045708503574133, 0.031036969274282455, 0.024529987946152687, 0.038770467042922974, 0.030578918755054474, 0.00014155123790260404, 0.005046718288213015, -0.07623045891523361, -0.006517007946968079, -0.01056914497166872, -0.02285049483180046, 0.043572988361120224, 0.018392644822597504, 0.04207416623830795, -0.08514225482940674, 0.057710979133844376, 0.0658908486366272, -0.02394537255167961, -0.016398835927248, -0.07147517800331116, 0.06037593260407448, 0.023953517898917198, -0.01710660010576248, -0.014121985994279385, -0.026310699060559273, -0.12045285105705261, 0.0007676384411752224, -0.08243923634290695, 0.04840841516852379, -0.017753032967448235, -0.010780050419270992, -0.06208435073494911, -0.01592147909104824, 0.05985451489686966, -0.04787678271532059, 0.025965990498661995, 0.04561161994934082, -0.024814801290631294, -0.043342217803001404, -0.037907883524894714, -0.013452719897031784, -0.07044542580842972, -0.006838506553322077, -0.048871494829654694, 0.017410626634955406, -0.022610029205679893, 0.03997170925140381, -0.02387171983718872, 0.009607373736798763, 0.02712332271039486, 0.019259057939052582, 0.03854680433869362, 0.06554283201694489, 0.030503632500767708, 0.020627351477742195, -0.004613715223968029, 0.003537503071129322, 0.08256994187831879, -0.22136425971984863, 0.11122680455446243, 0.04187219589948654, -0.0042095850221812725, -0.024056708440184593, -0.006296386010944843, 0.014981964603066444, 0.03966398164629936, 0.020790938287973404, 0.04219851642847061, 0.056042954325675964, 0.016971908509731293, 0.006576663814485073, -0.020212534815073013, 0.00998476892709732, -0.01551118679344654, -0.017782697454094887, -0.0020494195632636547, 0.005811708513647318, -0.016328664496541023, -0.03865758702158928, -0.03302277624607086, -0.014252150431275368, -0.02044442482292652, -0.002025164430961013, -0.06605836749076843, 0.04095112904906273, -0.02060285024344921, -0.0066260481253266335, -0.03010532632470131, -0.042193349450826645, 0.0311291441321373, -0.10387289524078369, -0.02129456028342247, 0.021939482539892197, -0.007348438259214163, 0.022576067596673965, 0.21172545850276947, -0.0774608924984932, 0.020665867254137993, 0.04466044157743454, -0.05662780627608299, 0.05276887118816376, -0.05050947144627571, -0.02617426961660385, -0.022847797721624374, -0.06772694736719131, 0.00011741404887288809, 0.009645694866776466, -0.029930781573057175, 0.085689976811409, -0.035497162491083145, 0.004294745158404112, 0.026068728417158127, -0.018140243366360664, 0.04844377562403679, 0.00020044337725266814, -0.040302716195583344, 0.00957020279020071, 0.035371940582990646, -0.010745099745690823, -0.032474808394908905, 0.0033595841377973557, -0.07058114558458328, 0.08028189092874527, 0.08415338397026062, 0.04604291543364525, 0.032141804695129395, 0.04985005781054497, 0.045205648988485336, -0.04321134462952614, -0.027590567246079445, -0.02999114990234375, -0.014431010000407696, 0.020174993202090263, -0.00442605372518301, 0.02102758176624775, -0.036968253552913666, -0.004048692993819714, -0.12897419929504395, -0.02496407926082611, -0.08454738557338715, -0.01777593605220318, 0.11200129240751266, -0.05849393457174301, 0.04089736565947533, -0.02781781367957592, 0.007056307978928089, -0.045136671513319016, 0.05750247463583946, -0.05331914871931076, 0.045200660824775696, 0.0036288986448198557, 0.02960464358329773, 0.005877225194126368, 0.07589497417211533, -0.06231626868247986, -0.02275686524808407, 0.022928079590201378, -0.06827489286661148, -0.03457866981625557, 0.05614685267210007, -0.0015250439755618572, -0.10972301661968231, 0.013354643248021603, -0.015834281221032143, 0.011471386067569256, -0.06420662254095078, -0.027558213099837303, 0.018937353044748306, -0.06414917856454849, 0.031094929203391075, 0.09771381318569183, 0.024733344092965126, 0.01847497560083866, -0.004366535227745771, 0.019123148173093796, 0.004020479042083025, 0.07110387086868286, -0.05147586017847061, -0.006583169102668762, 0.04276624321937561, 0.022204648703336716, -0.06706733256578445, 0.008323200047016144, -0.04717675596475601, 0.06532106548547745, 0.021817289292812347, -0.028799226507544518, 0.01807866245508194, -0.012342189438641071, 0.012893800623714924, -0.01885830983519554, -0.033006615936756134, -0.014727767556905746, -0.03730401396751404, 0.015388001687824726, -0.02379993349313736, 0.09446312487125397, -0.04201625660061836, -0.05741683393716812, 0.025156991556286812, 0.01615065708756447, 0.017903294414281845, 0.02376941405236721, -0.017209967598319054, 0.03750472515821457, 0.05708664655685425, -0.08454038202762604, -0.0035506857093423605, 0.043875738978385925, 0.0057885474525392056, -0.01242911908775568, -0.0003173579752910882, 0.010186574421823025, 0.05813633278012276, 0.006484593730419874, 0.030232345685362816, 0.05382215976715088, -0.07565579563379288, -0.062263600528240204, -0.19267988204956055, 0.016589606180787086, -0.02041703276336193, -0.05918768793344498, 0.014188230037689209, -0.03568689525127411, 0.03587091714143753, 0.006557483691722155, 0.05792877450585365, 0.02664336748421192, 0.09439864754676819, 0.02142239734530449, -0.035945285111665726, 0.02214733697474003, 0.014549791812896729, 0.013546635396778584, 0.03032904677093029, -0.0047066789120435715, -0.004098596516996622, -0.03746204823255539, -0.015923188999295235, 0.02187548391520977, -0.03525068983435631, -0.06309166550636292, 0.05709848180413246, -0.034026045352220535, 0.18743500113487244, 0.11707816272974014, -0.025873620063066483, -0.004659231752157211, 0.031977538019418716, 0.07694944739341736, -0.04327947273850441, -0.09129650890827179, 0.05616889148950577, 0.05334415286779404, 0.009024705737829208, -0.042021527886390686, -0.0581616573035717, -0.02414149045944214, -0.03271776810288429, 0.030304841697216034, -0.006035528611391783, -0.08638238161802292, 0.015014801174402237, -0.04932597279548645, -0.01609606109559536, 0.01573875918984413, -0.027063356712460518, 0.06799016892910004, 0.07386073470115662, 0.008721229620277882, 0.04077722504734993, 0.025945423170924187, 0.025759747251868248, -0.02274571731686592, -0.039316143840551376, -0.004018941428512335, -0.002881003776565194, 0.03670113533735275, 0.0025405327323824167, -0.06294570863246918, 0.00015406310558319092, -0.01845705695450306, 0.0210912823677063, 0.04420103877782822, -0.05389131233096123, -0.010136286728084087, 0.06269773095846176, -0.050788797438144684, 0.003776176832616329, 0.10596689581871033, 0.006286517716944218, -0.024364104494452477, 0.07166974991559982, 0.03751880303025246, 0.036683328449726105, -0.024015234783291817, 0.014228018000721931, -0.027907004579901695, 0.025115443393588066, 0.0011074172798544168, 0.030957333743572235, 0.0409199483692646, 0.027450622990727425, -0.007282888051122427, 0.022625479847192764, 0.00274518970400095, 0.010704346001148224, -0.04454425349831581, 0.017698831856250763, 0.023553375154733658, -0.028797175735235214, -0.03783954307436943, -0.008419884368777275, 0.01886896602809429, -0.35123661160469055, 0.054051924496889114, -0.02639452926814556, 0.005312591325491667, -0.029629148542881012, 0.038780007511377335, 0.051105890423059464, 0.031992726027965546, -0.07725968956947327, 0.00892612710595131, -0.00476545374840498, -0.0030146753415465355, 0.039410460740327835, -0.03612295165657997, -0.013194343075156212, 0.033070389181375504, -0.017007138580083847, -0.05257594957947731, 0.04303605481982231, -0.00765102356672287, 0.03163297846913338, 0.015035535208880901, 0.21476790308952332, 0.011014803312718868, 0.019144365563988686, -0.011443043127655983, -0.023534689098596573, -0.004019040614366531, 0.06238899752497673, -0.03619571402668953, 0.03542870283126831, 0.024090833961963654, 0.023781731724739075, -0.05475332960486412, 0.006293261889368296, 0.04183734208345413, -0.07289958745241165, 0.051858723163604736, -0.008479518815875053, -0.03477722406387329, -0.05948251485824585, 0.03751243278384209, -0.021686889231204987, -0.020487643778324127, 0.12021414190530777, -0.05377756804227829, -0.019171684980392456, -0.02562026120722294, 0.027957657352089882, 0.017510278150439262, -0.030157603323459625, -0.005166049115359783, -0.06651822477579117, -0.029861699789762497, -0.0062556141056120396, 0.03689028322696686, -0.022446203976869583, -0.03813581168651581, -0.025554239749908447, 0.007305705454200506, 0.03900710865855217, -0.022687043994665146, 0.03430347144603729, 0.05574864521622658, 0.03418279439210892 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
# How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI Building applications with Go provides many advantages. The language is fast, simple, and lightweight while supporting powerful features like concurrency, strong typing, and a robust standard library. In this tutorial, we’ll use the popular Gin web framework along with MongoDB to build a Go-based web application. Gin is a minimalist web framework for Golang that provides an easy way to build web servers and APIs. It is fast, lightweight, and modular, making it ideal for building microservices and APIs, but can be easily extended to build full-blown applications. We'll use Gin to build a web application with three endpoints that connect to a MongoDB database. MongoDB is a popular document-oriented NoSQL database that stores data in JSON-like documents. MongoDB is a great fit for building modern applications.
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.06787771731615067, -0.012960485182702541, 0.0006823365692980587, -0.031336840242147446, 0.0005002072430215776, -0.0019981965888291597, -0.011269290000200272, 0.0245248693972826, -0.025746358558535576, 0.00892161950469017, -0.002255581319332123, -0.02585158310830593, 0.05319559946656227, 0.0691743716597557, -0.010784477926790714, -0.018017390742897987, -0.01940760761499405, 0.005281358025968075, -0.04634047672152519, 0.023820839822292328, 0.06896346807479858, -0.031531818211078644, -0.026165083050727844, -0.055685076862573624, 0.004313794430345297, 0.07524456828832626, -0.005359267350286245, -0.01595606468617916, -0.024294449016451836, -0.16274642944335938, -0.012450342066586018, -0.03509649634361267, 0.015838732942938805, -0.031724896281957626, -0.001509647467173636, -0.043825890868902206, -0.0013655739603564143, 0.025961585342884064, -0.029519053176045418, 0.03917890042066574, 0.06562172621488571, 0.023615684360265732, -0.015486840158700943, -0.05622231587767601, -0.01465002540498972, -0.04960256069898605, -0.028304249048233032, 0.009213895536959171, -0.00861828587949276, -0.03892553970217705, 0.001156009966507554, -0.033729515969753265, -0.0011038851225748658, 0.0062986817210912704, 0.03203662857413292, 0.07447454333305359, 0.03147142753005028, 0.04450724646449089, -0.005397516768425703, -0.007437527645379305, 0.06801952421665192, 0.006467129103839397, -0.14061999320983887, 0.123076893389225, 0.028115222230553627, 0.02637501433491707, -0.030113207176327705, -0.0007303543388843536, 0.0417080782353878, 0.05035294592380524, -0.043544087558984756, 0.014962072484195232, -0.0033984333276748657, 0.05487525463104248, 0.015986943617463112, -0.002124619437381625, 0.010201639495790005, -0.026711175218224525, 0.04652472212910652, 0.0348648838698864, -0.03186170756816864, -0.05413714796304703, -0.03390899673104286, 0.016315868124365807, -0.02685091830790043, -0.04459787532687187, -0.019448935985565186, -0.055367160588502884, 0.03805896267294884, 0.014161231927573681, -0.03459010273218155, -0.012728077359497547, 0.023567330092191696, 0.006064855493605137, -0.018000561743974686, 0.006407180801033974, 0.011250985786318779, 0.036852601915597916, -0.005039215087890625, 0.25339367985725403, -0.06181379035115242, 0.003638874739408493, 0.019558001309633255, -0.03849876672029495, 0.011781444773077965, -0.029993761330842972, -0.0028656823560595512, -0.013818059116601944, 0.01920531690120697, -0.009678713977336884, 0.0012429339112713933, -0.03546131029725075, 0.018096240237355232, -0.07372883707284927, 0.023582367226481438, -0.0051376838237047195, -0.01153151411563158, 0.009222623892128468, -0.03922288492321968, 0.015356980264186859, 0.011303686536848545, 0.028194323182106018, 0.05098354071378708, 0.0014576077228412032, 0.0474250353872776, -0.05592231824994087, 0.020221134647727013, 0.0672219917178154, 0.028147798031568527, 0.020392831414937973, 0.054247934371232986, -0.0023934482596814632, -0.07271359860897064, -0.04347458854317665, 0.034183319658041, 0.0019166454439982772, 0.024608546867966652, 0.00525075476616621, 0.004967742599546909, 0.012185056693851948, -0.04996136948466301, -0.04504755511879921, -0.013887453824281693, -0.1133580282330513, -0.05547245219349861, 0.10053671896457672, 0.01639576442539692, 0.07162395864725113, -0.055556707084178925, -0.023787280544638634, -0.0027055134996771812, 0.07468530535697937, -0.041178297251462936, -0.01789262890815735, -0.0008067593444138765, 0.022803036496043205, 0.019210489466786385, 0.07344242185354233, -0.020942971110343933, -0.04414115473628044, -0.04816994071006775, -0.037583913654088974, -0.040828630328178406, 0.05887461081147194, 0.017062967643141747, -0.1426849663257599, -0.0013058430049568415, 0.03432747721672058, 0.0057843029499053955, -0.0181319247931242, 0.027150241658091545, 0.05681400001049042, -0.03758933022618294, -0.005752318073064089, 0.07160913944244385, 0.015091574750840664, -0.06394153833389282, -0.024236178025603294, -0.0021483360324054956, 0.023978929966688156, 0.023814097046852112, -0.02719752863049507, -0.045860655605793, 0.03307240083813667, -0.006841572932898998, -0.05477716028690338, -0.01868303492665291, -0.03162269666790962, 0.04938845708966255, 0.03332562372088432, -0.06877411901950836, 0.029672810807824135, 0.012473640963435173, -0.019394218921661377, -0.002105781575664878, -0.037743132561445236, 0.003848992520943284, -0.04346953704953194, 0.0201193168759346, -0.039003368467092514, 0.07830751687288284, 0.01086872536689043, -0.026637837290763855, 0.01726318523287773, 0.010937105864286423, 0.008385072462260723, -0.019002972170710564, -0.0166104007512331, 0.03788924589753151, 0.011187650263309479, -0.03483753278851509, -0.010790575295686722, 0.07067687064409256, 0.01764621026813984, -0.04110964015126228, -0.00943452212959528, 0.029835879802703857, 0.05597341060638428, 0.031032420694828033, 0.05677645653486252, -0.021718861535191536, -0.05874043330550194, -0.05764826014637947, -0.2564217150211334, -0.01969257742166519, -0.03203244507312775, 0.011839257553219795, 0.04636780172586441, -0.04117448627948761, 0.03235992416739464, -0.03638464957475662, -0.04971693456172943, 0.06373467296361923, 0.089589424431324, -0.031273253262043, 0.019217105582356453, 0.03107311576604843, -0.06962988525629044, 0.06988424807786942, 0.02842104062438011, 0.00031547536491416395, -0.04548787698149681, 0.036349255591630936, 0.013255964033305645, 0.006511019077152014, 0.008605766110122204, -0.08195449411869049, 0.0027319001965224743, 0.01989905536174774, 0.22500556707382202, 0.011645190417766571, -0.010496461763978004, -0.07155419886112213, 0.05291781201958656, -0.0027184621430933475, -0.00885190349072218, -0.1494782567024231, 0.03684861212968826, 0.02349378913640976, 0.08025448024272919, 0.012612985447049141, -0.028148077428340912, 0.004142167512327433, -0.026524841785430908, 0.02997123822569847, 0.04293360561132431, -0.1121940016746521, 0.013421413488686085, -0.03280293568968773, -0.024079730734229088, -0.04570801928639412, -0.005550139117985964, 0.01968051679432392, 0.02785591594874859, 0.01571645401418209, 0.07212917506694794, 0.04925031214952469, -0.05313577502965927, -0.06084147468209267, -0.0957689881324768, 0.039527833461761475, -0.024741360917687416, 0.025940939784049988, 0.004704104270786047, -0.04228260740637779, 0.010073898360133171, -0.016114722937345505, 0.0380621999502182, -0.02915046736598015, 0.0060829101130366325, -0.04154910147190094, 0.025819752365350723, -0.031469956040382385, -0.032222237437963486, 0.059484146535396576, -0.027678418904542923, 0.05050376430153847, 0.04882766678929329, 0.05246743932366371, 0.016574179753661156, -0.03940171003341675, -0.026468252763152122, -0.03723269701004028, 0.027122540399432182, -0.019951488822698593, 0.043137528002262115, -0.0005887449951842427, 0.05076169595122337, 0.060644764453172684, 0.06115669012069702, -0.03612615540623665, 0.024022463709115982, -0.0011651277309283614, 0.03169472515583038, -0.024293532595038414, -0.05291043594479561, -0.06222982704639435, 0.01205839030444622, -0.012492146342992783, -0.32109206914901733, 0.04711285978555679, -0.02909013256430626, 0.06432653963565826, -0.007546956185251474, 0.03306177631020546, 0.05137581750750542, 0.009628891944885254, -0.028651688247919083, 0.04896034672856331, 0.059080496430397034, -0.0034473396372050047, 0.014344950206577778, -0.035436518490314484, 0.018888434395194054, 0.04491523653268814, 0.03481986001133919, -0.011950802057981491, 0.038044560700654984, -0.04443719610571861, 0.037029337137937546, 0.04922381415963173, 0.25982609391212463, -0.012078770436346531, 0.0656610056757927, 0.045859724283218384, -0.008526909165084362, 0.01803593337535858, 0.045303065329790115, 0.035872429609298706, -0.008825494907796383, 0.012501256540417671, 0.10667551308870316, -0.02757289446890354, 0.02772372029721737, 0.03619563207030296, -0.035224977880716324, 0.01102470699697733, 0.01574244350194931, -0.03752734512090683, -0.037910837680101395, 0.02993818372488022, -0.037293437868356705, 0.019216420128941536, 0.09707589447498322, -0.055773522704839706, -0.05649843066930771, -0.05732464790344238, 0.0062192026525735855, 0.013437856920063496, -0.04524204134941101, -0.022942647337913513, -0.02984962798655033, -0.02363063581287861, 0.01640540175139904, 0.028542062267661095, -0.0012170403497293591, -0.016134316101670265, -0.04467560350894928, -0.04167870059609413, -0.00969450268894434, -0.05094783753156662, 0.004291319753974676, 0.05136561021208763, 0.016019079834222794 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
Rather than building the entire application by hand, we’ll leverage a coding AI assistant by Sourcegraph called Cody to help us build our Go application. Cody is the only AI assistant that knows your entire codebase and can help you write, debug, test, and document your code. We’ll use many of these features as we build our application today. ## Prerequisites Before you begin, you’ll need: - Go installed on your development machine. Download it on their website. - A MongoDB Atlas account. Sign up for free. - Basic familiarity with Go and MongoDB syntax. - Sourcegraph Cody installed in your favorite IDE. (For this tutorial, we'll be using VS Code). Get it for free. Once you meet the prerequisites, you’re ready to build. Let’s go. ## Getting started
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.04911436140537262, -0.02002384327352047, 0.011819763109087944, -0.026090355589985847, 0.0070401933044195175, -0.002453114604577422, 0.01636004075407982, 0.03129266947507858, -0.049594223499298096, 0.006113497540354729, -0.007689142599701881, -0.0656534805893898, 0.056570589542388916, 0.04403359442949295, -0.0038349695969372988, -0.006364644505083561, -0.029622958973050117, 0.008998741395771503, -0.047587718814611435, 0.01846502162516117, 0.025093069300055504, -0.012292495928704739, -0.019960295408964157, -0.09457770735025406, -0.02541275881230831, 0.09035160392522812, -0.059379786252975464, -0.027885625138878822, -0.03848419710993767, -0.16143983602523804, -0.0149069270119071, -0.04535491764545441, 0.06955922394990921, -0.023124106228351593, -0.019179528579115868, -0.03203355893492699, -0.017156288027763367, 0.03559781238436699, -0.014069687575101852, 0.012650598771870136, 0.029924795031547546, -0.007514194585382938, -0.024112271144986153, -0.04440491646528244, -0.004511924926191568, -0.05383754149079323, -0.01902448758482933, -0.004548660945147276, 0.008770591579377651, 0.006727759726345539, 0.032411571592092514, -0.02438807301223278, 0.0027103994507342577, 0.015825269743800163, 0.02747066132724285, 0.06432391703128815, 0.0469762459397316, 0.08142304420471191, 0.01625649817287922, 0.010557861998677254, 0.03625930845737457, 0.0012662471272051334, -0.17589706182479858, 0.09016023576259613, 0.024643756449222565, 0.07532650232315063, -0.01759256236255169, 0.01246502622961998, 0.03918958082795143, 0.06585971266031265, -0.04739690199494362, 0.014238262549042702, 0.02741568349301815, 0.034590739756822586, 0.012453123927116394, -0.010551602579653263, 0.0270814448595047, -0.01418769359588623, 0.03333945572376251, 0.018478762358427048, -0.06648994982242584, -0.039231184870004654, -0.04275044426321983, 0.045606765896081924, -0.02563219517469406, -0.040846336632966995, 0.007517796941101551, -0.019339827820658684, 0.07461922615766525, -0.015899302437901497, -0.005391907878220081, -0.016064269468188286, 0.005733880214393139, 0.03638860210776329, -0.06203026324510574, 0.013574482873082161, 0.034867558628320694, 0.030631575733423233, -0.040622882544994354, 0.23940658569335938, -0.04188397154211998, -0.01751886121928692, 0.009902238845825195, -0.02474905177950859, 0.011403372511267662, -0.02975527010858059, 0.017587261274456978, -0.022930841892957687, -0.00882027018815279, -0.01688252203166485, -0.01360236294567585, 0.0036962246522307396, 0.0393190011382103, -0.05690309405326843, 0.044491302222013474, -0.019091226160526276, 0.02060271054506302, -0.017788181081414223, -0.0508364774286747, 0.016989147290587425, 0.018704159185290337, 0.03202782943844795, 0.015653595328330994, 0.021300017833709717, 0.025925882160663605, -0.056269556283950806, 0.03397192806005478, 0.10308215022087097, 0.02401788718998432, 0.0166336502879858, 0.07881255447864532, 0.014099876396358013, -0.09140437841415405, -0.005603790748864412, 0.01480172760784626, -0.010943224653601646, 0.026554932817816734, 0.004851433914154768, 0.0184186939150095, -0.012618454173207283, -0.04558742791414261, 0.0016393620753660798, -0.015452679246664047, -0.07268279790878296, -0.04714261367917061, 0.0528976209461689, -0.015917079523205757, 0.044244494289159775, -0.03641638532280922, -0.026856958866119385, -0.012910768389701843, 0.04194365441799164, -0.007843932136893272, 0.0035494458861649036, 0.00034780436544679105, 0.02502134069800377, 0.0445825420320034, 0.05946529656648636, -0.06069030240178108, 0.012204778380692005, -0.022792264819145203, -0.05402505025267601, -0.036777228116989136, 0.036030907183885574, 0.007712978404015303, -0.12767338752746582, -0.02058650739490986, 0.018761465325951576, 0.010001289658248425, -0.023977017030119896, 0.03299931809306145, 0.03296290338039398, -0.06639993190765381, 0.0017107693711295724, 0.06420281529426575, 0.021604036912322044, -0.056510668247938156, 0.007693220861256123, -0.010941298678517342, 0.032299239188432693, 0.0228591226041317, -0.03959661349654198, -0.03831779211759567, 0.028044596314430237, 0.014828518964350224, -0.033065345138311386, 0.00015217624604701996, -0.03952111676335335, 0.01895935833454132, 0.04422562196850777, -0.0328899584710598, 0.0522630549967289, 0.009964766912162304, -0.021609976887702942, -0.03129703551530838, -0.024575885385274887, -0.012982219457626343, -0.012292706407606602, 0.01721826195716858, -0.043545935302972794, 0.05294663459062576, 0.00871993601322174, -0.013693784363567829, 0.020913435146212578, -0.01717429980635643, -0.008563010953366756, -0.007903281599283218, -0.018347490578889847, 0.01948392391204834, 0.0006110499962233007, -0.07367464154958725, -0.010122904554009438, 0.075519859790802, -0.021158577874302864, -0.057883214205503464, 0.023465489968657494, 0.005863254889845848, 0.036406245082616806, 0.018077844753861427, 0.0634375661611557, -0.008291471749544144, -0.031566470861434937, -0.0008153662784025073, -0.2606821656227112, -0.013080216944217682, -0.02291945181787014, 0.01439214963465929, 0.00046682480024173856, -0.06484679132699966, 0.004839509725570679, -0.04031634330749512, 0.0028194820042699575, 0.07493715733289719, 0.09473519772291183, -0.028764799237251282, -0.005071842111647129, 0.024191539734601974, -0.016086382791399956, 0.08710784465074539, 0.029414549469947815, 0.0303835216909647, -0.012163389474153519, -0.002852627309039235, -0.005645737983286381, 0.017539890483021736, 0.019381769001483917, -0.14532600343227386, -0.006962429266422987, 0.04251038283109665, 0.22774839401245117, 0.0309794619679451, 0.053542736917734146, -0.04455515742301941, 0.0015831432538107038, -0.022569749504327774, -0.00770923774689436, -0.1585138887166977, 0.06881599128246307, 0.018877701833844185, 0.051683854311704636, -0.009616585448384285, 0.031086545437574387, -0.021340426057577133, -0.06482987105846405, 0.036992091685533524, 0.011719238013029099, -0.10662214457988739, -0.02016935497522354, -0.0212940014898777, -0.03522534668445587, -0.046764206141233444, -0.02223682962357998, 0.03405940532684326, 0.03132835030555725, -0.0018367795273661613, 0.04542803764343262, 0.032804980874061584, -0.025930266827344894, -0.0498855784535408, -0.08168792724609375, 0.03493712097406387, -0.00841912068426609, 0.057950835675001144, -0.004476245027035475, -0.05963871628046036, 0.011604570783674717, -0.036292899399995804, 0.07497653365135193, -0.00920038390904665, 0.002437600865960121, -0.021063627675175667, 0.05623059719800949, -0.03769328072667122, 0.01826188713312149, 0.042791418731212616, -0.015525861643254757, 0.024857038632035255, 0.029810311272740364, -0.01130448468029499, 0.021036487072706223, -0.05184149369597435, -0.0004364907508715987, -0.04318385198712349, 0.025576191022992134, -0.027719801291823387, -0.015673784539103508, -0.006800010334700346, 0.06714945286512375, 0.07053759694099426, 0.043094974011182785, -0.01678023859858513, 0.05960998684167862, -0.000779271125793457, 0.0014342658687382936, 0.002219918416813016, -0.04111332818865776, -0.06107087805867195, 0.01204383373260498, -0.025093819946050644, -0.3155083656311035, 0.035618677735328674, 0.018207941204309464, 0.03725193813443184, 0.0005072554922662675, 0.03805147483944893, 0.06745237857103348, -0.0001684686285443604, -0.03641926124691963, 0.013290366157889366, 0.018425334244966507, 0.03809112682938576, 0.003954524174332619, -0.02708972804248333, 0.01618291065096855, 0.030559949576854706, 0.09574146568775177, -0.031272511929273605, 0.03528418764472008, -0.0778234526515007, 0.048514474183321, 0.03905409574508667, 0.23856668174266815, -0.0044428505934774876, 0.07557591795921326, 0.03631998598575592, -0.010627266950905323, 0.014709419570863247, 0.0883578434586525, -0.002790517406538129, 0.02939927950501442, 0.025347253307700157, 0.09774027019739151, -0.055136460810899734, 0.04486745223402977, 0.06430226564407349, -0.049599673599004745, 0.009616316296160221, 0.0002535140374675393, -0.020206155255436897, -0.02213359996676445, 0.01331667136400938, -0.001258071861229837, 0.03433091193437576, 0.08512795716524124, -0.03059704415500164, -0.06466905772686005, -0.038913875818252563, -0.03382841870188713, -0.0014518855605274439, -0.04411713778972626, -0.04596360772848129, -0.041813913732767105, -0.02121051959693432, 0.008401110768318176, 0.04533123970031738, -0.04298490285873413, -0.013610647059977055, -0.042642299085855484, -0.07627037167549133, 0.019394317641854286, -0.08928375691175461, 0.03648148849606514, 0.06091395393013954, -0.01055143866688013 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
Once you meet the prerequisites, you’re ready to build. Let’s go. ## Getting started We'll start by creating a new Go project for our application. For this example, we’ll name the project **mflix**, so let’s go ahead and create the project directory and navigate into it: ```bash mkdir mflix cd mflix ``` Next, initialize a new Go module, which will manage dependencies for our project: ```bash go mod init mflix ``` Now that we have our Go module created, let’s install the dependencies for our project. We’ll keep it really simple and just install the `gin` and `mongodb` libraries. ```bash go get github.com/gin-gonic/gin go get go.mongodb.org/mongo-driver/mongo ``` With our dependencies fetched and installed, we’re ready to start building our application. ## Gin application setup with Cody
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.0393575094640255, -0.01464158296585083, 0.035994503647089005, -0.05541827902197838, -0.006708794739097357, -0.00030420927214436233, -0.020268550142645836, 0.024914070963859558, -0.04246092215180397, -0.014285317622125149, 0.010057779960334301, -0.0577499121427536, 0.06342416256666183, 0.01116478256881237, 0.01021342258900404, 0.004073863849043846, -0.019917257130146027, -0.005898270756006241, -0.03738807886838913, 0.012690871022641659, 0.03290485590696335, -0.02979346737265587, -0.01347537711262703, -0.06624569743871689, 0.0211538877338171, 0.08570805937051773, 0.007908926345407963, -0.0033519896678626537, -0.0034355930984020233, -0.18222877383232117, -0.013476945459842682, -0.027293380349874496, 0.021019991487264633, -0.040267132222652435, 0.0034037972800433636, -0.032560162246227264, -0.02742057852447033, 0.04365041106939316, -0.03481768071651459, 0.012777361087501049, 0.0702250525355339, 0.007755798287689686, -0.017423385754227638, -0.09350095689296722, -0.011616649106144905, -0.07269953191280365, -0.023183241486549377, -0.003200182458385825, 0.03931848704814911, -0.05742523819208145, 0.013335206545889378, -0.04471422731876373, 0.015057397074997425, 0.011589071713387966, 0.020395619794726372, 0.0931997299194336, 0.05076945573091507, 0.02443205751478672, 0.016620101407170296, -0.009420843794941902, 0.026506511494517326, 0.010916082188487053, -0.1967259645462036, 0.12044060230255127, 0.03177110478281975, 0.04119785130023956, 0.006679818965494633, 0.01498984731733799, 0.04547493904829025, 0.06791181117296219, -0.07657933980226517, 0.021061429753899574, 0.020625069737434387, 0.051164671778678894, 0.004582643508911133, -0.019552363082766533, 0.02286573499441147, -0.0452638640999794, 0.046643465757369995, 0.01409204863011837, -0.007462211884558201, -0.023297831416130066, -0.0422358401119709, 0.03114485926926136, -0.032129134982824326, -0.04018738865852356, 0.008328508585691452, -0.023563632741570473, 0.016345733776688576, 0.0039887758903205395, -0.010763687081634998, -0.014011822640895844, 0.0020550591871142387, 0.000489420082885772, -0.053088899701833725, 0.01858787052333355, 0.03188705071806908, 0.027493683621287346, -0.01758497953414917, 0.2333187460899353, -0.04625473916530609, -0.0035373943392187357, 0.0035818282049149275, -0.023467905819416046, 0.02521662972867489, -0.008905586786568165, 0.004086568020284176, 0.01048743724822998, 0.014164578169584274, -0.02841573767364025, 0.02362760342657566, -0.037035033106803894, 0.035431183874607086, -0.0721065104007721, 0.04128246754407883, -0.008887972682714462, -0.048585910350084305, 0.005920472089201212, -0.027717771008610725, 0.019125832244753838, 0.034483861178159714, 0.009103584103286266, 0.046706318855285645, 0.0037056959699839354, 0.039139922708272934, -0.05563528463244438, 0.038700491189956665, 0.07642628997564316, 0.0419982448220253, 0.033921729773283005, 0.021009432151913643, 0.02235526405274868, -0.05311884731054306, -0.009450464509427547, 0.03734917938709259, 0.03901826590299606, 0.012317060492932796, 0.0012337295338511467, 0.04378683120012283, 0.005845290143042803, -0.03776558116078377, -0.034539561718702316, -0.006378641817718744, -0.13472871482372284, -0.042550355195999146, 0.05834081768989563, -0.02726167067885399, 0.061974167823791504, -0.047360632568597794, -0.01356116496026516, -0.022168293595314026, 0.04311339184641838, -0.030772175639867783, -0.008871957659721375, -0.004479552619159222, -0.012745733372867107, 0.024217432364821434, 0.0821099579334259, -0.03501493111252785, -0.008687165565788746, -0.062271926552057266, -0.05997038260102272, -0.043275877833366394, 0.041294943541288376, 0.034387800842523575, -0.10997382551431656, -0.007917629554867744, 0.03375838324427605, 0.040265001356601715, -0.022951647639274597, 0.005961813498288393, 0.04486462101340294, -0.039961595088243484, 0.0038839487824589014, 0.08237925916910172, -0.0036992295645177364, -0.06294107437133789, 0.00829680822789669, -0.010822624899446964, -0.0065416027791798115, 0.025578798726201057, -0.01703241840004921, -0.03631776198744774, 0.015148934908211231, 0.009540745988488197, -0.05544302985072136, -0.023961743339896202, -0.019363274797797203, 0.013056185096502304, 0.04950407147407532, -0.07059731334447861, 0.03934819623827934, 0.01917196996510029, -0.016718098893761635, -0.012660005129873753, -0.036036260426044464, -0.016911296173930168, -0.023869913071393967, 0.021590765565633774, -0.03244130685925484, 0.06084790825843811, 0.01221650093793869, -0.0007729719509370625, 0.03639409691095352, -0.045151058584451675, 0.02018747664988041, -0.01726624183356762, -0.010265779681503773, 0.07912735641002655, 0.0046781012788414955, -0.053625114262104034, 0.010586508549749851, 0.11014170199632645, -0.010504445992410183, -0.023525932803750038, 0.01530094537883997, 0.012190130539238453, 0.03712114319205284, 0.03705431893467903, 0.05892064422369003, -0.005163286812603474, -0.03689633309841156, -0.048827946186065674, -0.2706429660320282, 0.016443034633994102, -0.01577351987361908, 0.0256513599306345, 0.048973292112350464, -0.01888252981007099, 0.04934990778565407, -0.04519139230251312, -0.04897011071443558, 0.060095012187957764, 0.09300603717565536, -0.07972031086683273, 0.025162477046251297, 0.02157805860042572, -0.05684841051697731, 0.05187522992491722, 0.0012701119994744658, -0.0049710641615092754, -0.02512289024889469, 0.02240527980029583, -0.011209880001842976, -0.000603736552875489, 0.000009534925993648358, -0.08035942912101746, 0.014212186448276043, 0.05008196085691452, 0.19332186877727509, 0.05757078900933266, 0.011350697837769985, -0.08212263882160187, 0.07429610192775726, -0.0032587223686277866, -0.025864114984869957, -0.18005172908306122, 0.012933199293911457, 0.01692475937306881, 0.05940628796815872, -0.0027520370204001665, 0.008975954726338387, 0.009034565649926662, -0.022537056356668472, 0.027564268559217453, 0.017033465206623077, -0.09760706126689911, -0.008474028669297695, -0.017794780433177948, -0.05287341773509979, -0.007939583621919155, -0.013783000409603119, 0.007797758094966412, 0.016168750822544098, 0.022811392322182655, 0.04683515056967735, 0.01778988353908062, -0.02054033987224102, -0.07992943376302719, -0.09003790467977524, 0.03621622920036316, -0.018986713141202927, 0.028776811435818672, 0.021816091611981392, -0.052425507456064224, 0.0346825048327446, -0.033473625779151917, 0.02635899744927883, -0.02763937972486019, -0.01646948792040348, -0.035591524094343185, 0.052948884665966034, -0.0298460703343153, 0.02147490717470646, 0.017230750992894173, -0.022188358008861542, 0.04261258617043495, 0.04718808829784393, 0.010684538632631302, 0.018890859559178352, -0.03172171488404274, -0.036251001060009, -0.029955841600894928, 0.018686853349208832, -0.04587654769420624, 0.014783593825995922, 0.003760844236239791, 0.054224468767642975, 0.05011993646621704, 0.046425845474004745, -0.019822118803858757, 0.007494165562093258, 0.02241048775613308, 0.02131994441151619, -0.011162186972796917, -0.04448268562555313, -0.06384766101837158, 0.01064238976687193, -0.00846896693110466, -0.2951679229736328, 0.05653929337859154, 0.004565989598631859, 0.05933835729956627, -0.0069396947510540485, 0.008806407451629639, 0.10201682895421982, 0.015874655917286873, -0.006847135256975889, 0.04416206479072571, 0.04914841055870056, -0.009338906966149807, 0.01728707365691662, -0.016151245683431625, 0.016261644661426544, 0.010117538273334503, 0.08080098032951355, -0.024833910167217255, 0.01761498674750328, -0.09051795303821564, 0.03745068609714508, 0.030374109745025635, 0.2301023006439209, -0.023513993248343468, 0.05382731556892395, 0.06197134405374527, -0.003907337319105864, 0.03407546877861023, 0.03188139572739601, 0.02837252803146839, 0.03175513446331024, 0.009782235138118267, 0.08879365026950836, -0.045438893139362335, 0.05962199345231056, 0.05814969167113304, -0.0576469786465168, 0.02956794947385788, 0.02129390835762024, -0.027229949831962585, -0.05439745634794235, 0.014585037715733051, -0.04112059995532036, -0.00031199996010400355, 0.08551499247550964, -0.09573134034872055, -0.026724277064204216, -0.07029443979263306, -0.005349018145352602, 0.019293999299407005, -0.056682780385017395, -0.028655648231506348, -0.022209595888853073, -0.020113136619329453, 0.00888021569699049, 0.02981545217335224, -0.017383823171257973, -0.0027986993081867695, -0.02434675395488739, -0.044863011687994, -0.023451855406165123, -0.06355208158493042, 0.045851923525333405, 0.06050299108028412, -0.0034561678767204285 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
With our dependencies fetched and installed, we’re ready to start building our application. ## Gin application setup with Cody To start building our application, let’s go ahead and create our entry point into the app by creating a **main.go** file. Next, while we can set up our application manually, we’ll instead leverage Cody to build out our starting point. In the Cody chat window, we can ask Cody to create a basic Go Gin application. guide. The database that we will work with is called `sample_mflix` and the collection in that database we’ll use is called `movies`. This dataset contains a list of movies with various information like the plot, genre, year of release, and much more. on the movies collection. Aggregation operations process multiple documents and return computed results. So with this endpoint, the end user could pass in any valid MongoDB aggregation pipeline to run various analyses on the `movies` collection.
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.055039599537849426, -0.022808924317359924, 0.012010747566819191, -0.05039064213633537, -0.00813840702176094, -0.0073469108901917934, 0.007991711609065533, 0.008952494710683823, -0.04051196575164795, -0.006907064933329821, 0.001612439751625061, -0.04975254461169243, 0.07331635802984238, 0.03943450376391411, -0.02135615423321724, -0.00694167148321867, 0.0006604283698834479, -0.019162502139806747, -0.042433660477399826, 0.019732123240828514, 0.05275159701704979, -0.028782527893781662, -0.015303950756788254, -0.07600294053554535, 0.03183876350522041, 0.06763039529323578, -0.027597613632678986, 0.0009252035524696112, -0.029750501736998558, -0.19453400373458862, -0.01085315365344286, -0.026246747002005577, 0.048558905720710754, -0.025279399007558823, -0.018087157979607582, -0.055514026433229446, -0.009579965844750404, 0.025694875046610832, -0.03010001964867115, 0.008755750954151154, 0.06169481948018074, -0.005272131413221359, 0.00006310998287517577, -0.0730229988694191, -0.036058973520994186, -0.05389697104692459, -0.021651260554790497, 0.007917739450931549, 0.00011488484597066417, -0.017735037952661514, 0.00779984425753355, -0.06214817240834236, 0.015209312550723553, 0.015978625044226646, 0.009516376070678234, 0.07613764703273773, 0.05191343277692795, 0.017733212560415268, -0.011228588409721851, -0.0007175651844590902, 0.0381159670650959, -0.008895941078662872, -0.1963784545660019, 0.10574878752231598, 0.010066655464470387, 0.044817015528678894, -0.016745002940297127, 0.02951890043914318, 0.06672142446041107, 0.061968475580215454, -0.07956676185131073, 0.037405967712402344, 0.0233550276607275, 0.061977703124284744, 0.0002263982460135594, -0.022051433101296425, 0.029543347656726837, -0.018914060667157173, 0.01103524211794138, 0.04429035261273384, -0.014577449299395084, -0.033554282039403915, -0.028643270954489708, 0.046470023691654205, -0.017831020057201385, -0.03876056149601936, 0.03922247141599655, -0.027908412739634514, 0.029073994606733322, 0.021545344963669777, -0.0006125865038484335, 0.009142911992967129, -0.002247236203402281, 0.022747883573174477, -0.0356866791844368, 0.013362294062972069, 0.03588618338108063, 0.02916869893670082, -0.0036591023672372103, 0.24453690648078918, -0.03108290024101734, -0.013179403729736805, 0.015107736922800541, -0.028603211045265198, 0.020214416086673737, -0.017606699839234352, -0.02502186968922615, -0.02310057543218136, 0.005224819760769606, 0.0034022105392068624, 0.008006125688552856, -0.020696332678198814, 0.013975860550999641, -0.08112571388483047, 0.0443609319627285, -0.027444805949926376, -0.027761181816458702, 0.0025740237906575203, -0.04102881997823715, 0.009835263714194298, 0.04261709004640579, 0.03481094539165497, 0.029887380078434944, 0.009198151528835297, 0.02191108651459217, -0.05644607916474342, 0.06913114339113235, 0.07332056015729904, 0.02738301083445549, -0.007117634639143944, 0.049434397369623184, 0.008709177374839783, -0.08494836091995239, -0.025330860167741776, 0.00931401178240776, 0.03675425052642822, 0.03619963675737381, 0.001571368775330484, 0.04624614492058754, 0.03210624307394028, -0.0610186904668808, -0.02070304937660694, -0.0039262291975319386, -0.11291643232107162, -0.05064750835299492, 0.09996078163385391, -0.015504383482038975, 0.048979997634887695, -0.04861636087298393, -0.03522217273712158, -0.009058533236384392, 0.05679876357316971, -0.060299091041088104, 0.002348813461139798, -0.013620992191135883, 0.0024250249844044447, 0.04102009907364845, 0.08442575484514236, -0.03390084207057953, 0.031873371452093124, -0.06649290770292282, -0.06033388525247574, -0.03101305477321148, 0.03671755641698837, 0.02439231611788273, -0.1189706027507782, -0.010392582044005394, 0.03569895029067993, 0.012907632626593113, -0.020950529724359512, 0.03299298882484436, 0.030666951090097427, -0.05813717469573021, -0.009048827923834324, 0.06060957908630371, 0.005913624539971352, -0.052304934710264206, -0.005302135366946459, -0.01837891712784767, 0.007836319506168365, 0.02719956822693348, -0.011583888903260231, -0.04305573180317879, 0.017754454165697098, 0.014349540695548058, -0.06319478899240494, -0.017569096758961678, -0.04116855934262276, 0.033861901611089706, 0.038458067923784256, -0.09336358308792114, 0.001570782158523798, 0.012607191689312458, -0.017948871478438377, -0.02160448208451271, -0.03654839098453522, 0.004096844233572483, -0.024027688428759575, -0.004255179315805435, -0.024080853909254074, 0.07011973112821579, 0.01833992823958397, -0.005605956539511681, 0.03743511438369751, -0.01181140448898077, 0.05676525831222534, -0.03425689786672592, -0.0073387883603572845, 0.05838467925786972, -0.023690132424235344, -0.05916961655020714, -0.009927768260240555, 0.08039550483226776, -0.015321796759963036, -0.04573235660791397, 0.007804911118000746, 0.025033148005604744, 0.02102414332330227, 0.029530925676226616, 0.05166855454444885, 0.006637373939156532, -0.01905597560107708, -0.0150398975238204, -0.2876335084438324, -0.001754298689775169, -0.008472168818116188, 0.02152782678604126, 0.030781636014580727, -0.02455444447696209, 0.03393571451306343, -0.03886133059859276, -0.02693658508360386, 0.08057655394077301, 0.08381397277116776, -0.011794588528573513, 0.013117589987814426, 0.01711125485599041, -0.017268333584070206, 0.04908157140016556, -0.01032247208058834, 0.014938504435122013, -0.02831346169114113, 0.039058372378349304, -0.00009007100015878677, -0.022764043882489204, 0.014298789203166962, -0.07458396255970001, 0.003024263307452202, 0.04546215385198593, 0.21235719323158264, 0.03170052543282509, -0.00804250780493021, -0.08729176223278046, 0.05371425300836563, 0.023688457906246185, -0.029347017407417297, -0.1392301470041275, 0.020703326910734177, 0.012469044886529446, 0.06368086487054825, 0.02317184954881668, 0.01130132470279932, -0.008628780953586102, -0.03274527192115784, 0.01973544806241989, 0.02597827836871147, -0.12205752730369568, -0.0037374377716332674, -0.0367824025452137, -0.026300787925720215, -0.019495539367198944, -0.012292606756091118, 0.000996274990029633, 0.034533917903900146, -0.00656672241166234, 0.058344725519418716, 0.029030250385403633, -0.01011363510042429, -0.06878478080034256, -0.08927290141582489, 0.06219465658068657, -0.009612220339477062, 0.03279625251889229, -0.005837123375386, -0.03607901185750961, 0.03779615834355354, -0.02994942106306553, 0.03868783637881279, -0.030133111402392387, 0.014544719830155373, -0.03292980045080185, 0.021718502044677734, -0.022887544706463814, 0.0014750984264537692, 0.026794452220201492, -0.04085146635770798, 0.0566396526992321, 0.017658179625868797, 0.03091670759022236, 0.01897446997463703, -0.05475922301411629, -0.03537411987781525, -0.03540867939591408, 0.01818760298192501, -0.061856720596551895, 0.01844385266304016, -0.0067669241689145565, 0.062002602964639664, 0.0623512826859951, 0.027866903692483902, -0.015306137502193451, 0.02286851778626442, 0.01195420604199171, 0.02855079248547554, -0.01562759466469288, -0.05213063210248947, -0.057189811021089554, 0.015463399700820446, -0.0024584976490586996, -0.30112919211387634, 0.03562966734170914, 0.003081034403294325, 0.05259181931614876, 0.003288160776719451, 0.0006027825293131173, 0.07434124499559402, 0.016282930970191956, -0.002023490145802498, 0.04270442947745323, 0.04348758980631828, 0.0013230188051238656, 0.03318213298916817, -0.027763864025473595, 0.018434248864650726, 0.024596044793725014, 0.07457338273525238, 0.0025086072273552418, 0.034757986664772034, -0.0769546627998352, 0.05521776154637337, 0.04774077609181404, 0.22998124361038208, -0.005648627411574125, 0.03727058693766594, 0.04182886332273483, -0.011350887827575207, 0.027082500979304314, 0.04589676856994629, 0.004319178871810436, 0.04173301160335541, 0.00299981446005404, 0.10772206634283066, -0.06790360808372498, 0.05616426467895508, 0.03680889680981636, -0.04442719370126724, 0.016874128952622414, 0.037324123084545135, -0.02152358368039131, -0.045983992516994476, 0.012614384293556213, -0.04276013374328613, -0.003765834728255868, 0.07646354287862778, -0.05364535376429558, -0.04253588616847992, -0.05146687105298042, -0.004162871278822422, 0.019171210005879402, -0.09088356792926788, -0.018987834453582764, -0.029850291088223457, -0.005769449286162853, 0.02410140633583069, 0.03359223157167435, -0.03255811706185341, 0.008529597893357277, -0.02602267824113369, -0.036577459424734116, 0.005485599394887686, -0.060852665454149246, 0.014572547748684883, 0.051702454686164856, -0.0030874537769705057 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
Note that aggregations are very powerful and in a production environment, you probably wouldn’t want to enable this level of access through HTTP request payloads. But for the sake of the tutorial, we opted to keep it in. As a homework assignment for further learning, try using Cody to limit the number of stages or the types of operations that the end user can perform on this endpoint.
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.03626853972673416, -0.05535136163234711, 0.004521859344094992, -0.032165057957172394, -0.01100823562592268, 0.011267037130892277, 0.026952212676405907, 0.005513760726898909, 0.004569754935801029, -0.013932806439697742, 0.012227154336869717, -0.047977834939956665, 0.0666903704404831, 0.04802536964416504, -0.010988319292664528, -0.017791766673326492, 0.007131694816052914, 0.02545074187219143, -0.05761486664414406, 0.05382977053523064, 0.04255848005414009, 0.0025687285233289003, -0.03191396966576576, -0.04433318227529526, 0.016054537147283554, 0.018750306218862534, -0.043458327651023865, 0.0031389459036290646, -0.04734092950820923, -0.2183111608028412, 0.0035728546790778637, -0.08234526962041855, 0.05458364263176918, -0.024081289768218994, 0.009071881882846355, -0.025967499241232872, -0.015225623734295368, 0.0036690968554466963, -0.028310580179095268, 0.02727053314447403, 0.06714895367622375, 0.004700083751231432, -0.022982221096754074, -0.044682782143354416, -0.07144880294799805, -0.06920499354600906, -0.04000931978225708, -0.009104621596634388, 0.018715253099799156, -0.0027341064997017384, 0.040497902780771255, -0.04263120889663696, 0.016571825370192528, 0.03244668245315552, 0.04830525070428848, 0.036406707018613815, 0.01822820119559765, 0.07294471561908722, 0.016583142802119255, -0.008714823983609676, 0.04753132909536362, -0.00594632001593709, -0.1491289734840393, 0.07551656663417816, 0.05122729763388634, 0.05483135208487511, -0.02077183686196804, 0.007392093539237976, 0.028759339824318886, 0.04079918563365936, -0.000010908010153798386, 0.039867330342531204, -0.005193676333874464, 0.03911441192030907, 0.01575511321425438, 0.007615435868501663, -0.0014112493954598904, -0.029553448781371117, -0.0010325871407985687, 0.02543354593217373, -0.019094636663794518, -0.05696893110871315, -0.028871117159724236, -0.009465917944908142, -0.00653301365673542, -0.05326363071799278, 0.04770013689994812, -0.028929689899086952, 0.06387113034725189, 0.03225160017609596, -0.03220286965370178, -0.019576041027903557, -0.023789122700691223, 0.015931386500597, -0.04124411568045616, -0.0017631901428103447, 0.017510971054434776, 0.012885963544249535, -0.017194902524352074, 0.2056511491537094, -0.0365985669195652, -0.01654336415231228, 0.01462507899850607, -0.03473695367574692, 0.00844923872500658, -0.001467110705561936, -0.021776864305138588, -0.0022656540386378765, 0.008820884861052036, 0.027182918041944504, 0.004926271270960569, 0.0069240243174135685, 0.009061809629201889, -0.051606517285108566, 0.01487235352396965, 0.0005365906399674714, 0.027389025315642357, 0.004304487258195877, -0.04684017226099968, -0.04999833554029465, 0.013776302337646484, 0.042670704424381256, 0.030124198645353317, 0.020638197660446167, -0.00673648389056325, -0.028894174844026566, 0.08739075809717178, 0.12199203670024872, 0.03633355721831322, 0.012125172652304173, 0.037424229085445404, -0.03972814977169037, -0.054900649935007095, -0.04090707376599312, -0.01714545302093029, 0.00210993061773479, 0.040529828518629074, -0.017033319920301437, 0.01206177193671465, 0.05047212541103363, -0.035006582736968994, -0.08244340121746063, 0.026837021112442017, -0.09996305406093597, 0.0013674056390300393, 0.15044206380844116, 0.014267808757722378, 0.03918073698878288, -0.07811997830867767, -0.05389057472348213, -0.03390751779079437, 0.020430270582437515, -0.017473967745900154, 0.017131419852375984, -0.04106840863823891, 0.05965108051896095, 0.022777531296014786, 0.0626760870218277, -0.03376207500696182, 0.03323718532919884, -0.047713808715343475, -0.040295764803886414, -0.026722697541117668, 0.08409467339515686, 0.014890887774527073, -0.10958825796842575, -0.03733798861503601, 0.011211428791284561, -0.012698153033852577, -0.05102696642279625, 0.041641537100076675, 0.0028688216116279364, -0.061820968985557556, 0.012929043732583523, 0.08057545870542526, 0.016606733202934265, -0.04929593205451965, 0.010653800331056118, -0.02072088047862053, 0.025193369016051292, 0.01187426969408989, -0.04246407747268677, -0.034905657172203064, 0.04167192056775093, 0.02459304966032505, -0.0379173569381237, -0.018370212987065315, -0.013251611962914467, 0.027783216908574104, 0.027286101132631302, -0.07370057702064514, 0.0270979180932045, -0.04307294264435768, -0.006699800491333008, -0.011794683523476124, -0.03844345360994339, 0.03777901828289032, -0.01912214607000351, 0.014011574909090996, -0.040104687213897705, 0.056512653827667236, 0.047830965369939804, -0.05007760599255562, 0.05361766368150711, 0.01402994804084301, 0.047288503497838974, 0.022875869646668434, -0.0010015229927375913, 0.054817456752061844, 0.00024116809072438627, -0.0671149268746376, -0.01202836912125349, 0.014997678808867931, -0.027701247483491898, -0.0779932513833046, 0.03479412943124771, 0.044283393770456314, 0.03396490961313248, 0.014753269962966442, 0.059927284717559814, 0.021583113819360733, -0.005463758483529091, -0.022445645183324814, -0.27486011385917664, -0.013323473744094372, 0.02392391487956047, -0.021517399698495865, 0.023941567167639732, -0.08419425785541534, 0.01478049997240305, -0.005859108176082373, -0.014784608036279678, 0.0835081934928894, 0.12155154347419739, 0.03361262381076813, -0.045613836497068405, -0.007248294539749622, -0.02547547221183777, 0.04381528124213219, 0.001108026597648859, 0.006200731731951237, -0.0007704397430643439, 0.02240220084786415, -0.020300645381212234, 0.0026896758936345577, 0.017881598323583603, -0.05255661532282829, 0.042372170835733414, 0.02489527314901352, 0.23133456707000732, -0.010077889077365398, 0.006220838986337185, -0.05982799828052521, 0.04454321414232254, 0.025309402495622635, -0.07257663458585739, -0.1077028214931488, 0.033905111253261566, 0.029886357486248016, 0.03578749671578407, -0.020575692877173424, 0.04375425726175308, -0.039100281894207, -0.029725579544901848, 0.0029008048586547375, -0.0280007217079401, -0.129102885723114, 0.004461576230823994, -0.05707402527332306, -0.022436004132032394, 0.01280270330607891, -0.04038103297352791, 0.00037462380714714527, 0.0095122205093503, -0.033349644392728806, 0.02291005477309227, 0.032329168170690536, 0.005986157804727554, 0.010444310493767262, -0.054688461124897, 0.05496000126004219, -0.0011760086053982377, 0.0621841698884964, -0.015228450298309326, -0.02786858193576336, 0.0009730936144478619, -0.023474466055631638, 0.06523285061120987, -0.0016508122207596898, 0.004341190215200186, -0.01636810414493084, -0.0017549869371578097, -0.0409855879843235, -0.020316660404205322, 0.10603643208742142, -0.03594464808702469, 0.05332386493682861, 0.005576128605753183, 0.0041835978627204895, 0.010018700733780861, -0.052671730518341064, -0.006794249173253775, -0.04540575295686722, 0.02252405881881714, -0.06184830889105797, -0.008034599013626575, 0.05074456334114075, 0.066620834171772, 0.05353990197181702, 0.03802467882633209, -0.03755192831158638, 0.021587345749139786, 0.009756000712513924, -0.0007563236285932362, -0.01161863561719656, -0.06753761321306229, -0.023819098249077797, 0.030279649421572685, 0.014003797434270382, -0.25676387548446655, 0.013485067524015903, 0.0249509084969759, -0.004138374235481024, -0.0068361796438694, 0.02509196102619171, 0.03917155787348747, -0.010500185191631317, -0.07268206030130386, 0.05067416653037071, 0.011693565174937248, 0.07112357765436172, 0.02598922699689865, -0.046058811247348785, 0.058327723294496536, 0.05922376364469528, 0.04269219934940338, -0.02280697226524353, -0.006426753476262093, -0.10336276143789291, 0.06593836098909378, 0.016578957438468933, 0.27641016244888306, 0.00525842048227787, 0.0024598233867436647, 0.019722262397408485, -0.007034848444163799, 0.02246786467730999, 0.02993263304233551, 0.013132840394973755, 0.03409251198172569, -0.015765730291604996, 0.08938337117433548, -0.09678047895431519, 0.047653235495090485, 0.02788962423801422, -0.009836629964411259, 0.011914607137441635, 0.011731329374015331, 0.00213162275031209, -0.03195971995592117, -0.0037249396555125713, -0.047076184302568436, 0.013678787276148796, 0.057597722858190536, -0.003277264069765806, -0.08441527932882309, -0.07164658606052399, 0.031110312789678574, 0.026115601882338524, -0.048482369631528854, -0.0170789435505867, -0.050770457834005356, 0.020208323374390602, 0.03606051951646805, 0.050134461373090744, -0.025648845359683037, -0.013945250771939754, -0.05551828071475029, -0.03749018535017967, 0.024495413526892662, -0.030867651104927063, -0.02640765905380249, 0.04972822591662407, 0.002978924661874771 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
```go // POST /movies/aggregations - Run aggregations on movies func aggregateMovies(c *gin.Context) { // Get aggregation pipeline from request body var pipeline interface{} if err := c.ShouldBindJSON(&pipeline); err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) return } // Run aggregations cursor, err := mongoClient.Database("sample_mflix").Collection("movies").Aggregate(context.TODO(), pipeline) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } // Map results var result ]bson.M if err = cursor.All(context.TODO(), &result); err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } // Return result c.JSON(http.StatusOK, result) } ```
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.07706353068351746, -0.04038127139210701, 0.026832031086087227, -0.015367158688604832, 0.02524922974407673, -0.005921077914535999, 0.008182321675121784, -0.013385878875851631, -0.020976919680833817, -0.01635492965579033, 0.02561192587018013, -0.11304902285337448, 0.035426292568445206, 0.03596234694123268, -0.008178485557436943, -0.023584425449371338, 0.028909742832183838, 0.021354777738451958, -0.05983690544962883, 0.028027962893247604, 0.04395870119333267, -0.031170332804322243, -0.02238243818283081, -0.0592956580221653, 0.022161150351166725, 0.015294951386749744, -0.03623470664024353, -0.04392401501536369, -0.06347952038049698, -0.1865609884262085, -0.019904695451259613, -0.04448113590478897, 0.060786884278059006, -0.010152223519980907, 0.0035312597174197435, -0.02764909528195858, 0.003877772483974695, 0.02429632842540741, -0.05987192690372467, 0.026807444170117378, 0.054803479462862015, 0.0136930076405406, 0.0028637945652008057, -0.1128852590918541, -0.0658947080373764, -0.06312288343906403, 0.0032439481001347303, 0.009774896316230297, -0.007426136173307896, -0.030426448211073875, 0.02593955025076866, -0.08200229704380035, 0.01385640911757946, 0.02151682786643505, -0.021870285272598267, 0.04266337677836418, -0.025349685922265053, 0.04189065843820572, 0.019386988133192062, 0.0012171848211437464, 0.04955136775970459, 0.0013989907456561923, -0.17373709380626678, 0.08007320016622543, 0.0500389002263546, 0.059093765914440155, 0.0052804118022322655, 0.010818779468536377, 0.03224736824631691, 0.047919366508722305, -0.03997085243463516, 0.06630492955446243, 0.05451853573322296, 0.06021766737103462, -0.0005098077235743403, -0.01937079429626465, -0.009017357602715492, -0.036063965409994125, -0.013429657556116581, 0.03133535012602806, -0.028652118518948555, -0.03247596323490143, -0.04979947209358215, 0.02903481014072895, 0.022252244874835014, -0.03274162486195564, 0.05950810760259628, -0.04137897118926048, 0.05737381428480148, 0.023570844903588295, -0.051889508962631226, 0.043647076934576035, -0.019659820944070816, 0.04720011726021767, -0.05336914584040642, -0.0003593803849071264, 0.04776235297322273, 0.05287110432982445, 0.024932298809289932, 0.25838416814804077, -0.011375309899449348, 0.02062966115772724, 0.04922608286142349, -0.03861943259835243, 0.03271011635661125, -0.028510568663477898, -0.06841688603162766, -0.014743126928806305, 0.018215680494904518, 0.03692525625228882, 0.011545788496732712, -0.030076676979660988, 0.045686427503824234, -0.06454735994338989, 0.03056066296994686, -0.02828080952167511, 0.008989227935671806, 0.039001766592264175, -0.02943577989935875, -0.053468428552150726, 0.007122884038835764, 0.03322342410683632, 0.04121603071689606, -0.05434519425034523, 0.04786191135644913, -0.0877087190747261, 0.07189051061868668, 0.11987841874361038, 0.029349248856306076, -0.021407440304756165, 0.029847588390111923, 0.005781879648566246, -0.08430814743041992, -0.029927348718047142, 0.02630055882036686, 0.03851817175745964, -0.005482200998812914, 0.01555250957608223, 0.013333254493772984, 0.015049807727336884, -0.0458565354347229, -0.07238826900720596, -0.025533966720104218, -0.09647370874881744, -0.018345791846513748, 0.1193082332611084, 0.002772824838757515, 0.058211550116539, -0.0235336534678936, -0.039556585252285004, -0.013693643733859062, 0.056030336767435074, -0.049078527837991714, -0.01988469623029232, -0.022730054333806038, 0.012032991275191307, 0.08426699042320251, 0.10687647014856339, -0.037665363401174545, 0.05572781711816788, -0.08446333557367325, -0.026491427794098854, -0.005174248944967985, 0.08706676959991455, 0.017839550971984863, -0.09459858387708664, -0.01663353107869625, 0.014374597929418087, 0.005486177746206522, -0.023616332560777664, -0.012939013540744781, -0.015446453355252743, -0.022693876177072525, -0.008390200324356556, 0.07121934741735458, -0.005340376868844032, -0.02678573876619339, 0.011117490008473396, 0.008892368525266647, -0.012407027184963226, -0.003548320848494768, -0.038649529218673706, -0.06861206889152527, 0.06069526448845863, 0.030181877315044403, -0.04016783460974693, -0.026598159223794937, -0.05298256501555443, 0.036838434636592865, 0.06666817516088486, -0.06790412962436676, 0.004251040052622557, 0.0011871608439832926, -0.02951868623495102, -0.009319244883954525, -0.017245186492800713, 0.006527936551719904, -0.014253337867558002, 0.04258986562490463, -0.001407901174388826, 0.08764561265707016, 0.003280271776020527, -0.013835635036230087, 0.02850254997611046, 0.010787188075482845, 0.04438840225338936, -0.0365380123257637, -0.03783882409334183, 0.016191232949495316, -0.019647926092147827, -0.052303023636341095, -0.03780490159988403, 0.03853146359324455, 0.020378446206450462, -0.0431533083319664, 0.005519138183444738, 0.015301331877708435, 0.03002995438873768, 0.03960070013999939, 0.05533667281270027, 0.01001024805009365, -0.04884720221161842, -0.020662946626544, -0.2530590891838074, 0.020642410963773727, -0.008585355244576931, -0.030929960310459137, 0.018903732299804688, -0.030537759885191917, 0.006287422962486744, -0.01894763857126236, 0.020690476521849632, 0.08777016401290894, 0.04586060345172882, 0.01553038414567709, -0.040149230509996414, -0.003530362853780389, 0.013768628239631653, 0.04196197912096977, -0.033020488917827606, 0.007605972234159708, -0.01285495050251484, 0.02097485587000847, -0.0016684688162058592, -0.030324339866638184, 0.006567525677382946, -0.06599906831979752, 0.03653399646282196, 0.03556957095861435, 0.21480198204517365, 0.06902789324522018, -0.030212027952075005, -0.07010287046432495, 0.0587884895503521, 0.06799649447202682, -0.05472460761666298, -0.08059897273778915, 0.03320573642849922, 0.011233885772526264, 0.056582748889923096, -0.002434478374198079, -0.00022247697052080184, -0.03778534755110741, -0.011810433119535446, -0.003391137346625328, -0.0005928273894824088, -0.10990024358034134, -0.016580335795879364, -0.033150892704725266, -0.01731785014271736, 0.03212418779730797, -0.044387176632881165, -0.014687497168779373, 0.00361617305316031, -0.03917651250958443, 0.059163376688957214, 0.0163302980363369, -0.015256792306900024, 0.002031932817772031, -0.02774122729897499, 0.03610110655426979, -0.024223189800977707, 0.0585988350212574, 0.00923632550984621, -0.04273577779531479, 0.06785715371370316, -0.018549466505646706, 0.07160206884145737, -0.020502550527453423, 0.003600676078349352, 0.010962639935314655, -0.020335603505373, -0.0008118233527056873, -0.025095753371715546, 0.06777089089155197, -0.03760535642504692, 0.010632423684000969, 0.038104284554719925, 0.06201034411787987, 0.027438651770353317, -0.006478768307715654, -0.019421007484197617, -0.03745011240243912, 0.0036596939899027348, -0.04128525033593178, -0.00432185921818018, 0.023773247376084328, 0.0630594789981842, 0.021416552364826202, 0.005347948521375656, -0.014157010242342949, 0.00988847203552723, -0.01833859272301197, 0.03205958381295204, -0.020069623365998268, -0.07293366640806198, -0.04550677910447121, 0.023525280877947807, 0.03375973924994469, -0.2852887213230133, 0.023224467411637306, -0.020600251853466034, 0.03373029828071594, -0.003542327554896474, 0.0022095940075814724, 0.04945071041584015, 0.027872852981090546, -0.01963147521018982, 0.054339390248060226, 0.03773580491542816, 0.04680634289979935, 0.03748805448412895, -0.04371609538793564, -0.024909110739827156, 0.050666991621255875, 0.034848615527153015, -0.009489510208368301, 0.07006913423538208, -0.04381391778588295, 0.04793093726038933, 0.026581743732094765, 0.24229785799980164, -0.025765862315893173, -0.026625938713550568, 0.03623322769999504, -0.0013827738584950566, 0.015318102203309536, 0.028575869277119637, -0.016744600608944893, 0.011816381476819515, -0.023120764642953873, 0.10805033147335052, -0.06137601658701897, 0.03945198282599449, 0.0005282172933220863, -0.050719793885946274, 0.024948520585894585, 0.03913678601384163, -0.006925536319613457, -0.055995963513851166, -0.027090387418866158, -0.018296508118510246, -0.004861580207943916, 0.053221575915813446, -0.012349515222012997, -0.01737016811966896, -0.0566643625497818, 0.0037068724632263184, 0.04176780581474304, -0.06636881083250046, -0.028461070731282234, 0.01505750697106123, -0.004643296357244253, 0.029024137184023857, 0.006573883350938559, -0.028927579522132874, -0.02515244297683239, -0.02281266823410988, 0.001848598592914641, -0.012054101563990116, -0.053993724286556244, -0.010946099646389484, 0.049686260521411896, -0.018910566344857216 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
// Return result c.JSON(http.StatusOK, result) } ``` Now that we have our endpoints implemented, let’s add them to our router so that we can call them. Here again, we can use another feature of Cody, called autocomplete, to intelligently give us statement completions so that we don’t have to write all the code ourselves. ![Cody AI Autocomplete with Go][6] Our `main` function should now look like: ```go func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "Hello World", }) }) r.GET("/movies", getMovies) r.GET("/movies/:id", getMovieByID) r.POST("/movies/aggregations", aggregateMovies) r.Run() } ```
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.05938602238893509, -0.014004160650074482, 0.03543040528893471, -0.002516123466193676, 0.0021006392780691385, 0.00879143737256527, 0.032836344093084335, 0.06359874457120895, -0.01115456037223339, -0.027797410264611244, -0.021565353497862816, -0.030437715351581573, 0.0487184040248394, 0.0652117133140564, 0.01879017986357212, -0.0036533132661134005, -0.024745134636759758, 0.03916718065738678, -0.07601985335350037, 0.031633153557777405, 0.03493504971265793, -0.012189279310405254, -0.020276088267564774, -0.07435944676399231, 0.04768121615052223, 0.0342206209897995, -0.016620490700006485, -0.026754086837172508, -0.04806646704673767, -0.1738497018814087, -0.027280719950795174, -0.07475264370441437, 0.03210964426398277, -0.015687698498368263, -0.03202492743730545, -0.056719355285167694, -0.05667285993695259, 0.0026465088594704866, -0.03156041353940964, 0.0358574353158474, 0.04363546147942543, -0.01394503004848957, 0.006408046931028366, -0.03680951148271561, -0.04808604344725609, -0.04568006098270416, -0.008118333294987679, -0.010015051811933517, 0.00834245141595602, -0.040680669248104095, 0.022556371986865997, -0.01538396067917347, 0.02322523668408394, -0.0002603859466034919, -0.005455881357192993, 0.02733772061765194, -0.001467828406020999, 0.07424166798591614, 0.0023854044266045094, 0.011071151122450829, 0.05891049653291702, -0.005083083640784025, -0.18692435324192047, 0.0978822261095047, 0.010559340938925743, 0.036269623786211014, -0.01989535242319107, -0.0020259832963347435, 0.03889540210366249, 0.08845778554677963, -0.025318223983049393, 0.05904513970017433, 0.06013362482190132, 0.08333390206098557, -0.02145260199904442, -0.048970527946949005, 0.004231271333992481, 0.01811712235212326, 0.00109273218549788, 0.06222742795944214, 0.0008078984683379531, -0.05494951829314232, -0.050513558089733124, 0.03437485545873642, -0.005552028771489859, -0.04435534030199051, 0.021311836317181587, -0.059455789625644684, 0.08358859270811081, 0.01768096350133419, -0.0009478776482865214, -0.013355612754821777, -0.017869994044303894, 0.05691948160529137, -0.07294129580259323, 0.022562339901924133, 0.040786370635032654, 0.030850812792778015, -0.00700986385345459, 0.20073968172073364, -0.059499841183423996, 0.016858836635947227, 0.04314000904560089, -0.05871722474694252, 0.028161561116576195, -0.017231237143278122, -0.023919496685266495, -0.0032251307275146246, -0.0032546918373554945, 0.0016782295424491167, -0.013647045008838177, -0.019322095438838005, 0.048169899731874466, -0.03512699529528618, 0.03250819072127342, 0.024355573579669, 0.02729063481092453, -0.019973549991846085, -0.026320302858948708, -0.0032719208393245935, 0.03783901780843735, 0.018060656264424324, 0.003230453934520483, -0.028132563456892967, -0.003155501326546073, -0.03235510364174843, 0.08129379898309708, 0.12418457120656967, 0.037262897938489914, 0.03628408536314964, 0.08269218355417252, 0.00827035028487444, -0.0783383697271347, -0.025265652686357498, -0.030268967151641846, -0.026799790561199188, 0.05369986966252327, -0.03516535460948944, 0.01023227907717228, 0.004958141129463911, -0.03390047326683998, -0.05298297852277756, -0.04313578084111214, -0.09791692346334457, -0.018059583380818367, 0.09148114174604416, -0.013881771825253963, 0.046761829406023026, -0.024043569341301918, 0.0030788620933890343, -0.014301363378763199, 0.04972699657082558, -0.035890936851501465, -0.0439046248793602, -0.034620027989149094, 0.02553284727036953, 0.046096071600914, 0.049828872084617615, -0.04630899801850319, 0.017862902954220772, -0.03950701281428337, -0.05040224641561508, -0.04788339138031006, 0.05360762029886246, 0.021539008244872093, -0.12760217487812042, -0.02493945136666298, 0.009864084422588348, 0.010358170606195927, -0.031330712139606476, 0.015857400372624397, 0.02358655072748661, -0.07672930508852005, -0.029080791398882866, 0.037252336740493774, 0.022863050922751427, -0.037487976253032684, -0.011350754648447037, -0.006801454350352287, 0.029108760878443718, 0.007041417062282562, -0.03423861041665077, -0.03216098994016647, 0.04435883089900017, 0.04393522068858147, -0.045195870101451874, -0.011708726175129414, -0.03247694671154022, 0.02537945657968521, 0.01592303067445755, -0.03698050603270531, 0.007362211588770151, 0.01229751855134964, -0.031074076890945435, -0.024861712008714676, -0.02946370467543602, 0.0065996404737234116, -0.0313180573284626, 0.04526517167687416, 0.002657647943124175, 0.08146609365940094, 0.01312799472361803, -0.003037596819922328, 0.009862871840596199, -0.002545848721638322, 0.013896886259317398, -0.02263629622757435, -0.030905550345778465, 0.0498727485537529, -0.015335953794419765, -0.051141176372766495, -0.07076884061098099, 0.06335455924272537, -0.011157668195664883, -0.04108114540576935, -0.029389092698693275, 0.004352884367108345, 0.022135647013783455, 0.04479193314909935, 0.04465119540691376, -0.029372936114668846, -0.01721539907157421, -0.024160310626029968, -0.23118188977241516, -0.030871853232383728, 0.04040280357003212, -0.06952697038650513, 0.0173339806497097, -0.09048143774271011, 0.008294881321489811, 0.0018131546676158905, 0.019674941897392273, 0.049308497458696365, 0.09649068862199783, 0.0035660231951624155, 0.004147619009017944, 0.0030132103711366653, -0.021046726033091545, 0.06240362301468849, 0.0031790011562407017, -0.002585427602753043, -0.007363015320152044, 0.037454601377248764, -0.00666111521422863, -0.042241957038640976, 0.013911347836256027, -0.08998361229896545, -0.002111689420416951, 0.0066879549995064735, 0.23117336630821228, 0.04612085223197937, -0.0004949512658640742, -0.06725829094648361, 0.039138585329055786, 0.02959475666284561, -0.03821258619427681, -0.15217944979667664, 0.017722534015774727, 0.011596471071243286, 0.053996048867702484, 0.01808585412800312, 0.017105072736740112, -0.003952107857912779, -0.022654887288808823, 0.056437648832798004, -0.018094470724463463, -0.12737812101840973, 0.010548808611929417, -0.06443546712398529, -0.02484089508652687, -0.03710512816905975, -0.00960624311119318, 0.0260786022990942, 0.06651240587234497, -0.015489360317587852, 0.05342463031411171, 0.04663565382361412, -0.007793974131345749, 0.004103939048945904, -0.04825085029006004, 0.01027060579508543, -0.021387798711657524, 0.08506952971220016, -0.026465410366654396, -0.028210295364260674, -0.009588927030563354, -0.03675161674618721, 0.07258939743041992, 0.039670493453741074, 0.021619435399770737, -0.0012440936407074332, 0.01578066684305668, -0.023688212037086487, -0.029493380337953568, 0.09556466341018677, -0.039041969925165176, 0.06383182853460312, 0.02111705020070076, 0.02063894271850586, 0.03097064420580864, -0.02816065214574337, -0.0052725025452673435, -0.03735026717185974, 0.06414183229207993, -0.04863634333014488, 0.033728502690792084, -0.009789668954908848, 0.03773850202560425, 0.05308188498020172, 0.013877838850021362, 0.0073718721978366375, 0.040188103914260864, -0.015590647235512733, -0.021181926131248474, -0.02091069146990776, -0.01762406900525093, -0.038757454603910446, 0.03390784189105034, 0.007634345907717943, -0.28858864307403564, 0.01179813127964735, -0.008022487163543701, 0.026989325881004333, 0.010964760556817055, 0.029857588931918144, 0.046245027333498, 0.009953905828297138, -0.05993157997727394, 0.07358764111995697, 0.020724598318338394, 0.06037096306681633, 0.007945260033011436, -0.05823642387986183, -0.000034643770050024614, 0.06808773428201675, 0.053667742758989334, 0.018046224489808083, 0.03770287707448006, -0.04331495985388756, 0.05323482304811478, 0.08254072070121765, 0.24095287919044495, -0.023314163088798523, 0.07148738950490952, 0.061338331550359726, -0.016886215656995773, 0.027637140825390816, 0.05675889179110527, -0.020213643088936806, 0.04074345901608467, 0.020163489505648613, 0.07006002962589264, -0.059023600071668625, 0.02940709888935089, -0.0022965087555348873, -0.019557319581508636, 0.027457574382424355, 0.014316999353468418, -0.03962060436606407, -0.044515207409858704, -0.014628876931965351, -0.0057807681150734425, -0.030854159966111183, 0.06349772214889526, -0.0010631910990923643, -0.06507550179958344, -0.0740404725074768, 0.01077733188867569, 0.031736019998788834, -0.08537840843200684, -0.04213328659534454, -0.03923631086945534, -0.024378713220357895, 0.01837521605193615, 0.03279437869787216, -0.01691790483891964, 0.0033387611620128155, -0.05146436765789986, -0.03351053595542908, -0.03219446912407875, -0.07781735062599182, 0.01810903660953045, 0.055355437099933624, -0.028776036575436592 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
r.Run() } ``` Now that we have our routes set up, let’s test our application to make sure everything is working well. Restart the server and navigate to **localhost:8080/movies**. If all goes well, you should see a large list of movies returned in JSON format in your browser window. If you do not see this, check your IDE console to see what errors are shown. ![Sample Output for the Movies Endpoint][7] Let’s test the second endpoint. Pick any `id` from the movies collection and navigate to **localhost:8080/movies/{id}** — so for example, **localhost:8080/movies/573a1390f29313caabcd42e8**. If everything goes well, you should see that single movie listed. But if you’ve been following this tutorial, you actually won’t see the movie. ![String to Object ID Results Error][8]
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.06483202427625656, -0.025853043422102928, 0.03659021481871605, 0.012926132418215275, 0.029615670442581177, 0.008374655619263649, 0.0007005480001680553, 0.020831769332289696, 0.010043771006166935, -0.017459869384765625, 0.043202485889196396, -0.023029286414384842, 0.016834169626235962, 0.03556615486741066, 0.008600511588156223, -0.001440647873096168, 0.005664145108312368, 0.025761930271983147, -0.0634264349937439, 0.01696193404495716, 0.022424688562750816, 0.01191020105034113, -0.006469860672950745, -0.08853864669799805, 0.007459068205207586, 0.07084404677152634, -0.003492864081636071, -0.01525113359093666, -0.05515171214938164, -0.2111748903989792, -0.027763251215219498, -0.07336734235286713, 0.01975088194012642, -0.009054983966052532, 0.044307783246040344, -0.027246253564953804, -0.025392383337020874, 0.01791798509657383, -0.04095897823572159, 0.035178910940885544, 0.03447879105806351, 0.008644122630357742, -0.006640627980232239, -0.058189429342746735, -0.08239183574914932, -0.059371452778577805, -0.02671481855213642, -0.0019131585722789168, 0.06528865545988083, -0.03897301107645035, -0.031116824597120285, -0.035353682935237885, 0.04621795564889908, -0.014590728096663952, -0.03578953444957733, 0.04426852986216545, 0.021828588098287582, 0.07247087359428406, 0.026607124134898186, 0.02448374591767788, 0.05329511687159538, 0.025480272248387337, -0.18543043732643127, 0.09372992068529129, 0.05397183075547218, 0.007971313782036304, -0.027097150683403015, -0.0040163216181099415, 0.00471538258716464, 0.02443268522620201, -0.05329764634370804, 0.046313364058732986, 0.031140880659222603, 0.11061815172433853, -0.002150907414034009, -0.03848464787006378, -0.039715491235256195, 0.002461267402395606, 0.02554381638765335, 0.01818283088505268, -0.0005173888057470322, -0.06821345537900925, -0.02491777390241623, 0.022946836426854134, -0.00891672819852829, -0.007206727750599384, 0.010645273141562939, 0.0009454117971472442, 0.07684353739023209, 0.051811110228300095, -0.00914908479899168, 0.0043319035321474075, 0.006640983745455742, 0.04914974793791771, -0.08383574336767197, 0.020537741482257843, 0.04251261427998543, 0.010421325452625751, -0.026495084166526794, 0.21177375316619873, -0.023967020213603973, 0.005395108368247747, 0.052633367478847504, -0.014036216773092747, 0.031955536454916, -0.04684744030237198, -0.030252162367105484, 0.01105541829019785, 0.030177736654877663, 0.044728875160217285, 0.0167427659034729, -0.03599001467227936, 0.02348739095032215, -0.04800838604569435, 0.027556808665394783, 0.015451280400156975, 0.025619836524128914, 0.03585457801818848, -0.03768586739897728, -0.033073946833610535, 0.016011472791433334, -0.010639901272952557, 0.05604594945907593, -0.07104016840457916, 0.01678384281694889, -0.09559735655784607, 0.10226985812187195, 0.1219775602221489, 0.02696624957025051, 0.05595264956355095, 0.029715916141867638, -0.01906740292906761, -0.08565478026866913, -0.00018274926696904004, -0.027590138837695122, 0.015320750884711742, 0.030710948631167412, -0.017611214891076088, 0.014364649541676044, -0.023989582434296608, -0.018697673454880714, -0.08630271255970001, -0.012784981168806553, -0.09872377663850784, -0.007972443476319313, 0.1176823228597641, -0.006716244388371706, 0.0647197961807251, -0.016772599890828133, -0.05723106116056442, 0.015826012939214706, 0.06345203518867493, -0.034999653697013855, -0.03660348802804947, -0.06140419840812683, 0.007087149657309055, 0.04497356340289116, 0.04345070198178291, -0.020035358145833015, -0.005392471328377724, -0.04785245284438133, -0.03116358257830143, -0.033478718250989914, 0.06489155441522598, 0.019780607894062996, -0.05072749778628349, -0.0317922905087471, 0.009917107410728931, -0.014169842936098576, -0.051556505262851715, -0.02610410377383232, -0.007452318910509348, -0.06937472522258759, 0.004313213750720024, 0.03852410241961479, 0.004123450722545385, -0.049241285771131516, 0.04167226701974869, -0.0012502131285145879, 0.01741870492696762, 0.0031374928075820208, -0.03853289410471916, -0.05072186142206192, 0.01889611780643463, 0.035331208258867264, -0.06159227341413498, -0.018993917852640152, -0.05993656814098358, 0.05013643950223923, 0.02328016236424446, -0.05041465535759926, -0.048844244331121445, -0.03727392479777336, -0.060223646461963654, -0.010312417522072792, -0.00851686391979456, 0.003829012857750058, -0.020546462386846542, 0.04262813553214073, -0.052376482635736465, 0.11442612111568451, 0.019837114959955215, -0.017941921949386597, 0.05018986389040947, -0.04935600608587265, 0.008319657295942307, -0.03706951066851616, -0.04334400221705437, -0.008345754817128181, 0.006182644050568342, -0.054973699152469635, 0.012928089126944542, 0.0495603047311306, 0.005320086609572172, -0.04284176230430603, -0.024743372574448586, 0.00850157905369997, 0.028902240097522736, 0.060013096779584885, 0.05926212668418884, 0.03384508565068245, -0.05790466070175171, -0.004667265340685844, -0.25376972556114197, 0.008390061557292938, 0.019241349771618843, -0.033912163227796555, 0.015574753284454346, -0.051994357258081436, 0.015600988641381264, 0.013371314853429794, 0.024771610274910927, 0.07896243035793304, 0.0912712812423706, -0.025796137750148773, -0.015130285173654556, 0.005137675907462835, -0.0020792565774172544, 0.06583980470895767, 0.0027387519367039204, 0.020862629637122154, -0.023501809686422348, 0.043853335082530975, -0.014695405028760433, -0.06230098754167557, 0.004189622588455677, -0.06462451070547104, 0.04830826446413994, -0.0020770528353750706, 0.239076629281044, 0.09561582654714584, 0.036713991314172745, -0.05698153376579285, 0.05034633353352547, 0.08558009564876556, -0.04239630699157715, -0.09736401587724686, 0.04108114168047905, 0.01023048348724842, 0.04630820080637932, 0.03158552199602127, 0.03227841109037399, -0.01210483442991972, -0.017217792570590973, 0.01436279434710741, -0.012023484334349632, -0.060464076697826385, -0.0025560043286532164, -0.06161165609955788, -0.04005417600274086, -0.013825289905071259, -0.029406577348709106, -0.006043284200131893, 0.0430864579975605, -0.001280108350329101, 0.05180427432060242, 0.040496841073036194, 0.003052306594327092, 0.017817342653870583, -0.03232801333069801, 0.001626024954020977, -0.0019136241171509027, 0.056004878133535385, -0.033711936324834824, -0.021469922736287117, 0.03487192839384079, -0.05367618426680565, 0.10104864090681076, -0.009137147106230259, -0.003167396876960993, -0.022768231108784676, 0.051034193485975266, -0.019450927153229713, -0.008958487771451473, 0.06795994192361832, -0.004514298867434263, 0.015304284170269966, 0.04071183130145073, 0.0009740075329318643, 0.024193603545427322, -0.054460201412439346, -0.0067033008672297, -0.023889707401394844, 0.02272210456430912, -0.04562600702047348, 0.018107762560248375, -0.02021115832030773, 0.04682103917002678, 0.01406189426779747, 0.010948779992759228, -0.01419314555823803, 0.03646807372570038, -0.04907258227467537, 0.013879640959203243, -0.03750927373766899, -0.05418100953102112, -0.00942279864102602, 0.03815477341413498, 0.028130071237683296, -0.29335153102874756, 0.041792917996644974, 0.00362888490781188, 0.04262731224298477, -0.02098679170012474, -0.002880505984649062, 0.034712690860033035, 0.0017066756263375282, -0.039533331990242004, 0.030753111466765404, 0.04855446517467499, 0.02814248390495777, 0.04753842204809189, -0.023352840915322304, -0.014611008577048779, 0.05405306816101074, 0.03274798393249512, -0.027977492660284042, 0.06564754247665405, -0.061171505600214005, 0.03762693330645561, 0.03351417928934097, 0.2022659182548523, -0.017643101513385773, 0.038320306688547134, 0.02929941564798355, -0.012011812999844551, 0.021853778511285782, 0.022019287571310997, -0.03312506899237633, 0.023656686767935753, 0.018202371895313263, 0.07085142284631729, -0.06170866638422012, 0.05619364604353905, 0.004971813410520554, -0.03531894087791443, 0.01918846368789673, 0.043767333030700684, -0.020922010764479637, -0.05745355039834976, -0.02242204360663891, -0.0023368250112980604, -0.039805810898542404, 0.08864237368106842, -0.0539044514298439, -0.0144696906208992, -0.03395737707614899, 0.015216000378131866, 0.0053450968116521835, -0.0622168593108654, -0.04235716909170151, -0.0345202274620533, 0.017886538058519363, 0.03417003154754639, 0.027314472943544388, -0.03826726973056793, -0.01653759367763996, -0.06818335503339767, -0.0366266630589962, 0.015107092447578907, -0.08192343264818192, 0.025194939225912094, 0.02887662872672081, -0.013064999133348465 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
![String to Object ID Results Error][8] The issue is that in our `getMovie` function implementation, we are accepting the `id` value as a `string`, while the data type in our MongoDB database is an `ObjectID`. So when we run the `FindOne` method and try to match the string value of `id` to the `ObjectID` value, we don’t get a match. Let’s ask Cody to help us fix this by converting the string input we get to an `ObjectID`. ![Cody AI MongoDB String to ObjectID][9] Our updated `getMovieByID` function is as follows: ```go func getMovieByID(c *gin.Context) { // Get movie ID from URL idStr := c.Param("id")
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.06964364647865295, -0.009724597446620464, 0.0018036237452179193, 0.0012720117811113596, 0.009976607747375965, -0.04142439365386963, 0.03506843000650406, 0.01502987090498209, 0.0007704202434979379, -0.0017147327307611704, -0.007296479307115078, -0.07055879384279251, 0.07563955336809158, 0.03967054560780525, -0.04284133017063141, 0.010737857781350613, 0.02045692689716816, 0.029270652681589127, -0.06822812557220459, 0.05665776506066322, 0.04640287160873413, -0.015645062550902367, -0.04076961800456047, -0.06508354097604752, 0.03024834208190441, 0.06403457373380661, -0.00004722342418972403, -0.0011920315446332097, -0.03076416254043579, -0.22848999500274658, -0.033318400382995605, -0.0343463271856308, 0.009174341335892677, -0.04897076264023781, 0.020113546401262283, -0.03192170336842537, -0.007283493410795927, 0.03593103960156441, -0.02740955539047718, 0.062142446637153625, 0.032528750598430634, -0.008559067733585835, -0.014864198863506317, -0.0745745375752449, -0.03894960880279541, -0.02164720557630062, -0.04288656637072563, 0.014147519133985043, 0.011671091429889202, -0.03333469480276108, -0.033428143709897995, -0.017562024295330048, -0.00953136757016182, -0.0018250314751639962, -0.012024848721921444, 0.07368366420269012, 0.0001847023086156696, 0.05855283513665199, 0.026047158986330032, 0.0170566588640213, 0.07797352969646454, 0.011732319369912148, -0.1717677116394043, 0.10005579888820648, 0.03155513480305672, 0.02842848375439644, 0.00208744453266263, -0.03745667636394501, 0.01848578080534935, 0.025273479521274567, -0.02590671367943287, 0.016178488731384277, 0.042156197130680084, 0.052493803203105927, 0.011072850786149502, -0.015718648210167885, -0.003828918095678091, -0.07046867161989212, 0.04748174920678139, 0.023864399641752243, -0.043900422751903534, -0.06890091300010681, -0.04177650809288025, -0.003006358165293932, 0.003934526350349188, -0.036588724702596664, 0.008723043836653233, -0.07214552164077759, 0.066867396235466, 0.037297315895557404, -0.03245207294821739, 0.0034651667810976505, 0.020978113636374474, 0.034149300307035446, -0.08617782592773438, 0.026925362646579742, 0.004243065603077412, 0.05755200982093811, -0.0450417585670948, 0.22815807163715363, -0.04937155172228813, 0.006781920325011015, 0.03515393286943436, -0.040754348039627075, 0.021050872281193733, -0.0015199270565062761, -0.06552202254533768, -0.01136092934757471, 0.008761484175920486, 0.019044140353798866, -0.033947378396987915, -0.03396810218691826, 0.025069428607821465, -0.033880703151226044, 0.00280205812305212, 0.04183317348361015, 0.013538354076445103, 0.01142373587936163, -0.03646641597151756, -0.007677836809307337, 0.021444208920001984, 0.008437735959887505, 0.011318216100335121, 0.009126397781074047, 0.010965595953166485, -0.04871377348899841, 0.03862753510475159, 0.12131708115339279, 0.004021781496703625, 0.033692821860313416, 0.0882657989859581, -0.0017344385851174593, -0.12993355095386505, 0.0009655678295530379, 0.008583620190620422, 0.01739407517015934, 0.00597925903275609, 0.0034358545672148466, 0.007818765938282013, 0.007933047600090504, -0.02080678381025791, -0.12177412956953049, -0.034081775695085526, -0.058225542306900024, -0.046314992010593414, 0.10705896466970444, -0.028818869963288307, 0.041564326733350754, -0.025064269080758095, -0.024639489129185677, 0.0076981401070952415, 0.050963521003723145, -0.09055671095848083, -0.015758629888296127, -0.030863506719470024, -0.0034548905678093433, 0.04365069791674614, 0.07962937653064728, -0.034879930317401886, -0.015046746470034122, -0.02306102029979229, -0.017415834590792656, -0.05095118656754494, 0.04402471333742142, 0.013597440905869007, -0.07854542881250381, -0.04496746137738228, 0.01035861112177372, 0.013750918209552765, -0.06353320181369781, -0.0017139753326773643, 0.027621615678071976, -0.08414673060178757, 0.0012363683199509978, 0.07092518359422684, 0.029162760823965073, -0.0556509904563427, -0.0012423762818798423, -0.032053206115961075, 0.010790514759719372, -0.02186049520969391, -0.011681395582854748, -0.051495522260665894, -0.02070767804980278, 0.012395949102938175, -0.07201003283262253, -0.03693876415491104, -0.0543229840695858, 0.05134410411119461, 0.04422824829816818, -0.01952337846159935, -0.02106752060353756, -0.016167927533388138, -0.016007274389266968, -0.03415093943476677, -0.03622426837682724, 0.011134062893688679, -0.03343936800956726, 0.037861939519643784, -0.020982064306735992, 0.10696454346179962, 0.026231374591588974, 0.0008234986453317106, 0.016044598072767258, -0.01519539300352335, -0.0004332178214099258, -0.0012613078579306602, -0.05648431181907654, -0.015595931559801102, 0.03481798246502876, -0.03904438018798828, 0.0005005093407817185, 0.04790801554918289, 0.02083846740424633, -0.03477366268634796, -0.04347195848822594, 0.03147914260625839, 0.02464594505727291, 0.06425416469573975, 0.02780548669397831, -0.027845658361911774, -0.045373450964689255, -0.010645909234881401, -0.27881625294685364, 0.01580718345940113, 0.004322457127273083, -0.019941316917538643, 0.005695225205272436, -0.014395627193152905, 0.012568886391818523, 0.013397511094808578, -0.036447007209062576, 0.08143497258424759, 0.021294668316841125, -0.013031868264079094, 0.018987134099006653, 0.007779697421938181, -0.042616862803697586, 0.05204932391643524, 0.03817196562886238, -0.00796967651695013, 0.011385533027350903, 0.020933201536536217, -0.010564805008471012, -0.0374700203537941, -0.018244050443172455, -0.07849990576505661, 0.009528487920761108, -0.011163181625306606, 0.22714480757713318, 0.07940328866243362, -0.005397368222475052, -0.034689124673604965, 0.05780091509222984, 0.03372742608189583, -0.004807451739907265, -0.10422927886247635, 0.06392955780029297, -0.0020607805345207453, 0.03354700282216072, 0.018637118861079216, 0.02511053904891014, -0.01748838648200035, -0.01420709677040577, 0.03168998658657074, 0.016591113060712814, -0.06386495381593704, 0.02242572233080864, -0.04429910331964493, -0.03383979946374893, -0.008892692625522614, -0.027268413454294205, 0.04342883080244064, 0.0543089434504509, 0.05166184902191162, 0.05955525487661362, 0.041404396295547485, -0.021935036405920982, -0.01425243355333805, -0.039289895445108414, -0.012377270497381687, -0.0015415839152410626, 0.014537512324750423, -0.019969504326581955, -0.06582284718751907, 0.02888195402920246, -0.013083384372293949, 0.03704513981938362, -0.005492730066180229, 0.014372958801686764, -0.02238675020635128, 0.04831094667315483, -0.017292562872171402, -0.013142643496394157, 0.06842956691980362, 0.010000062175095081, 0.03597866743803024, 0.04517524689435959, 0.06283344328403473, -0.0026828607078641653, -0.04995272308588028, 0.005619571544229984, -0.015669705346226692, 0.03368170186877251, -0.024319779127836227, 0.052494216710329056, -0.036545850336551666, 0.07313375174999237, 0.034134846180677414, 0.03352002054452896, -0.003845409257337451, 0.0351312980055809, -0.04069981351494789, -0.0053049176931381226, -0.03740854933857918, -0.024611033499240875, -0.06373625248670578, 0.04637562856078148, 0.001918318565003574, -0.28311678767204285, 0.050497572869062424, 0.03589208051562309, 0.04505450651049614, -0.018100252375006676, 0.06016694754362106, 0.06684714555740356, -0.030420279130339622, -0.031008120626211166, -0.0017304111970588565, 0.031900737434625626, -0.028784215450286865, -0.0005516867386177182, 0.015608301386237144, 0.005756234750151634, 0.07223108410835266, 0.010462779551744461, -0.04288460314273834, 0.07548630237579346, -0.02169829048216343, 0.06668757647275925, 0.09356812387704849, 0.2237195521593094, -0.009581105783581734, 0.012011928483843803, 0.025159619748592377, 0.007000771351158619, 0.008620359003543854, 0.08904247730970383, -0.0073521798476576805, -0.002686380874365568, 0.03406663239002228, 0.09635499119758606, -0.0420772023499012, 0.052619922906160355, 0.011113917455077171, -0.021481698378920555, 0.009165843017399311, 0.021928492933511734, -0.03526223078370094, -0.041461601853370667, 0.03244629129767418, -0.02164510264992714, -0.013557935133576393, 0.09777086228132248, -0.010952804237604141, -0.015446791425347328, -0.043031077831983566, -0.006901809014379978, 0.010953061282634735, -0.061470672488212585, -0.004504753742367029, -0.0422905795276165, -0.002363237552344799, 0.027318784967064857, 0.028720105066895485, -0.027808761224150658, 0.013185501098632812, -0.04121941700577736, -0.03155030682682991, 0.027138909325003624, -0.06317748129367828, -0.019080977886915207, 0.054249025881290436, -0.02054051123559475 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
```go func getMovieByID(c *gin.Context) { // Get movie ID from URL idStr := c.Param("id") // Convert id string to ObjectId id, err := primitive.ObjectIDFromHex(idStr) if err != nil { c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()}) return } // Find movie by ObjectId var movie bson.M err = mongoClient.Database("sample_mflix").Collection("movies").FindOne(context.TODO(), bson.D{{"_id", id}}).Decode(&movie) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } // Return movie c.JSON(http.StatusOK, movie) } ``` Depending on your IDE, you may need to add the `primitive` dependency in your import statement. The final import statement looks like: ```go import ( "context" "log" "net/http"
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.0685332864522934, -0.0014796762261539698, 0.03180394321680069, -0.025883419439196587, 0.02782430127263069, -0.01769174449145794, 0.05349667742848396, 0.018662355840206146, -0.038612257689237595, 0.0008505504811182618, 0.00007356749847531319, -0.07971331477165222, 0.06278591603040695, 0.049463722854852676, -0.023050954565405846, -0.026241833344101906, 0.03124186396598816, -0.0019397991709411144, -0.0777350515127182, 0.025087906047701836, 0.05699149891734123, -0.05658027529716492, -0.00832131877541542, -0.06761758774518967, 0.04222721979022026, 0.04208340123295784, 0.003885754616931081, -0.004568025935441256, -0.04067189246416092, -0.18271706998348236, -0.033256784081459045, -0.004206740763038397, 0.003878834890201688, -0.028318848460912704, -0.02617882378399372, -0.02863539196550846, 0.01077656727284193, 0.011159805580973625, -0.0031615716870874166, 0.05344487354159355, 0.03096330352127552, -0.021003250032663345, -0.006091532297432423, -0.08865136653184891, -0.04008281230926514, -0.04951493442058563, 0.011872849427163601, 0.025527797639369965, 0.014749509282410145, -0.03591965138912201, -0.020638445392251015, -0.0405283086001873, 0.06038680672645569, 0.019163204357028008, -0.03612387552857399, 0.05632863938808441, 0.007169809658080339, 0.01301486138254404, 0.033189620822668076, 0.021929454058408737, 0.06358024477958679, 0.023348459973931313, -0.17926402390003204, 0.07818175852298737, 0.047450508922338486, 0.035000529140233994, -0.033876001834869385, -0.011290906928479671, 0.03720454126596451, 0.009474160149693489, -0.07830234616994858, 0.04586198925971985, 0.0491788387298584, 0.055685628205537796, -0.015959009528160095, -0.04552434757351875, 0.01826806738972664, -0.019918780773878098, 0.012218400835990906, 0.008670154958963394, -0.016800276935100555, -0.03019951842725277, -0.03649141639471054, -0.0005826646811328828, -0.00012174512085039169, -0.029298821464180946, 0.0414917916059494, -0.0495462641119957, 0.08400102704763412, 0.03931713476777077, -0.050750598311424255, 0.027765721082687378, -0.02291460707783699, 0.02666858583688736, -0.06643382459878922, 0.01782694272696972, 0.027667336165905, 0.04994679242372513, -0.01863745041191578, 0.24134662747383118, -0.030753953382372856, -0.019974149763584137, 0.05377392843365669, -0.010788172483444214, 0.024166211485862732, -0.00336774461902678, -0.07823874056339264, 0.006660913582891226, 0.024258015677332878, 0.030007636174559593, -0.021364443004131317, -0.031528156250715256, 0.04546795040369034, -0.028539754450321198, 0.04916082322597504, 0.0199971254914999, 0.004530908074229956, 0.015918025746941566, -0.03528175875544548, -0.025706535205245018, 0.01645929552614689, -0.01971767097711563, 0.053698115050792694, -0.038803983479738235, 0.01767006330192089, -0.09002930670976639, 0.04743955656886101, 0.10702425986528397, 0.010383490473031998, -0.007086998783051968, 0.060183607041835785, -0.01999685727059841, -0.07867897301912308, -0.002014579949900508, 0.029691621661186218, 0.03089507855474949, -0.0014678151346743107, 0.008668400347232819, -0.001024110708385706, -0.04113088175654411, -0.05752288177609444, -0.07356207817792892, -0.02252255752682686, -0.06660635024309158, -0.033710211515426636, 0.09104763716459274, 0.02362208627164364, 0.06124880909919739, -0.022525768727064133, -0.03724478930234909, -0.016978267580270767, 0.07970154285430908, -0.08466766029596329, -0.01216198317706585, -0.009926489554345608, -0.021484605967998505, 0.06076204776763916, 0.10331989079713821, -0.04161376133561134, 0.026437319815158844, -0.041477102786302567, -0.05286678299307823, -0.01451955083757639, 0.04064898565411568, 0.03491489961743355, -0.09218868613243103, -0.01471975352615118, 0.026367058977484703, 0.021972188726067543, -0.020285852253437042, -0.04174695163965225, 0.04891742393374443, -0.0538032203912735, -0.0076353480108082294, 0.06266507506370544, 0.013550293631851673, -0.051551997661590576, -0.01290199626237154, -0.020420825108885765, -0.0007370408275164664, -0.03598862513899803, -0.025415338575839996, -0.07086383551359177, 0.0035899104550480843, 0.04278070852160454, -0.0724315419793129, -0.0032708640210330486, -0.03341912850737572, 0.032031286507844925, 0.04779386520385742, -0.0340866893529892, 0.019852515310049057, 0.024021243676543236, -0.0038015181198716164, -0.009514519944787025, 0.010079840198159218, -0.023960506543517113, -0.024676021188497543, 0.04451773688197136, -0.010660163126885891, 0.13757002353668213, -0.00409696064889431, -0.020531246438622475, 0.013392829336225986, -0.0417199544608593, 0.02566169761121273, -0.017143938690423965, -0.043965499848127365, -0.002435507019981742, 0.014643744565546513, -0.060809750109910965, -0.010537834838032722, 0.05448779836297035, 0.025909047573804855, -0.04795576259493828, -0.029878702014684677, 0.03931935131549835, 0.022445745766162872, 0.06721426546573639, 0.03231053799390793, -0.02553081512451172, -0.058896176517009735, -0.019303321838378906, -0.273838073015213, 0.05642154812812805, -0.014968443661928177, -0.02232336439192295, -0.005935788154602051, -0.046840254217386246, 0.012989652343094349, -0.026769226416945457, 0.03569933772087097, 0.0862843468785286, 0.06325060874223709, 0.00007425500371027738, -0.030864739790558815, 0.023843424394726753, -0.022172218188643456, 0.05269789695739746, 0.010207688435912132, 0.004256648477166891, -0.018897272646427155, 0.039459265768527985, -0.0166658703237772, -0.04327043145895004, -0.01673751138150692, -0.05069839209318161, 0.021200278773903847, -0.00667828693985939, 0.23110724985599518, 0.0613936185836792, 0.0008112756186164916, -0.040626175701618195, 0.03896500915288925, 0.0650300458073616, -0.02109980583190918, -0.11285246908664703, 0.058983903378248215, -0.017994437366724014, 0.0688418298959732, 0.011306758038699627, 0.024510161951184273, -0.030760755762457848, 0.01007242500782013, 0.035014808177948, 0.004618292674422264, -0.088792584836483, -0.0012776703806594014, -0.030387958511710167, -0.03479010611772537, -0.0356837697327137, -0.0043348148465156555, 0.037291936576366425, 0.031539998948574066, 0.007763827219605446, 0.06067784130573273, 0.025364158675074577, -0.02766081877052784, -0.009032776579260826, -0.02094903774559498, 0.010018441826105118, -0.017461007460951805, 0.049036767333745956, -0.04195660352706909, -0.039440035820007324, 0.045425087213516235, -0.035025060176849365, 0.008007220923900604, -0.031827040016651154, 0.027325106784701347, -0.01283259503543377, 0.006880766246467829, 0.023603204637765884, 0.005143952555954456, 0.06784757971763611, -0.005299885757267475, 0.036922235041856766, 0.03490219637751579, 0.07188380509614944, 0.04942672699689865, 0.001044686883687973, -0.008035182021558285, -0.039595045149326324, 0.027265364304184914, -0.013355614617466927, 0.007774663623422384, -0.026524730026721954, 0.057339202612638474, 0.012937174178659916, 0.004960588179528713, -0.018236957490444183, 0.002507246332243085, -0.02204216830432415, 0.024086518213152885, -0.030649032443761826, -0.038802240043878555, -0.05867306515574455, 0.01610439456999302, 0.021105507388710976, -0.3197821080684662, 0.027517613023519516, -0.013904877007007599, 0.046023476868867874, 0.00019858610176015645, 0.015558870509266853, 0.04524831846356392, -0.0167890302836895, -0.023664943873882294, 0.04029228910803795, 0.04978477209806442, -0.03048965521156788, 0.012255119159817696, -0.0036255873274058104, -0.016368217766284943, 0.05087248608469963, 0.06093914434313774, -0.010557005181908607, 0.07733853161334991, -0.04499887302517891, 0.04158807918429375, 0.06055078282952309, 0.22026751935482025, -0.01564168743789196, 0.023351358249783516, 0.050448060035705566, -0.002352573908865452, 0.031749527901411057, 0.044239647686481476, -0.016529005020856857, 0.02016744762659073, 0.01265497226268053, 0.09857208281755447, -0.057829394936561584, 0.044603362679481506, -0.0063461181707680225, -0.05131252855062485, 0.011895200237631798, 0.03237123042345047, -0.022196779027581215, -0.05416826158761978, -0.024446342140436172, -0.03582407161593437, -0.023579759523272514, 0.09134471416473389, -0.041302211582660675, -0.027906429022550583, -0.04794914275407791, -0.029155366122722626, 0.018035268411040306, -0.062118466943502426, -0.000013398120245255996, -0.008411195129156113, -0.019575191661715508, 0.017789961770176888, -0.002160727046430111, -0.006168859079480171, -0.000645425810944289, -0.03626839816570282, -0.027111051604151726, -0.014296372421085835, -0.07523241639137268, 0.008779950439929962, 0.05158017575740814, -0.0034827927593141794 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
```go import ( "context" "log" "net/http" "github.com/gin-gonic/gin" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" ) ``` If we examine the new code that Cody provided, we can see that we are now getting the value from our `id` parameter and storing it into a variable named `idStr`. We then use the primitive package to try and convert the string to an `ObjectID`. If the `idStr` is a valid string that can be converted to an `ObjectID`, then we are good to go and we use the new `id` variable when doing our `FindOne` operation. If not, then we get an error message back.
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.023004325106739998, -0.015790536999702454, 0.016936462372541428, -0.01364209782332182, -0.0016608020523563027, -0.019356945529580116, 0.05201926454901695, 0.04129093140363693, -0.022341130301356316, -0.02693437598645687, 0.009278630837798119, -0.054840851575136185, 0.03636576235294342, 0.02565125748515129, -0.06642255932092667, -0.001124271540902555, -0.007701466325670481, -0.0037875822745263577, -0.07605806738138199, 0.04380262270569801, 0.03550812974572182, -0.03862615302205086, -0.029519569128751755, -0.05567336827516556, 0.03906462714076042, 0.10410543531179428, 0.010953851975500584, -0.02282601222395897, -0.022817207500338554, -0.22026889026165009, -0.012747484259307384, -0.02767324075102806, 0.00023020507069304585, -0.01674693450331688, -0.014920691959559917, 0.0038930883165448904, 0.010340099222958088, 0.04625426605343819, 0.027520090341567993, 0.05641844868659973, 0.047980647534132004, -0.03621098771691322, -0.04716811329126358, -0.04810693487524986, -0.03573284670710564, -0.024042634293437004, -0.028366759419441223, -0.0342625193297863, 0.028546826913952827, -0.009949177503585815, -0.005568503402173519, -0.002739590359851718, 0.004450101405382156, 0.0036415134090930223, -0.004027707036584616, 0.08550151437520981, 0.04303735867142677, 0.04034179076552391, 0.021308373659849167, 0.017921404913067818, 0.04850093275308609, 0.03110223449766636, -0.15370720624923706, 0.08423219621181488, 0.03504344820976257, 0.041364192962646484, -0.03224722668528557, -0.028468890115618706, 0.02337377518415451, -0.0006632162258028984, -0.02051398530602455, 0.011790384538471699, 0.04003238305449486, 0.04804695397615433, 0.011949022300541401, -0.04497582092881203, 0.00530449440702796, -0.04163217172026634, 0.01367255114018917, 0.02229912206530571, -0.036623336374759674, -0.038699015974998474, -0.02710195630788803, 0.008710748516023159, -0.0058946916833519936, -0.060675691813230515, -0.0063153100199997425, -0.0465882271528244, 0.07740858942270279, 0.003045417368412018, -0.019064122810959816, -0.01608256809413433, 0.029652908444404602, 0.06433209776878357, -0.06047719344496727, 0.05091165751218796, 0.00683148019015789, 0.04649066552519798, -0.03529326617717743, 0.20853140950202942, -0.0455743744969368, -0.01803332380950451, -0.00014786481915507466, -0.0021323685068637133, -0.0018207445973530412, 0.008536373265087605, -0.05399925261735916, -0.02353842742741108, -0.0043208482675254345, 0.021059857681393623, -0.02537224255502224, -0.061461709439754486, 0.043667279183864594, -0.025682270526885986, 0.035832490772008896, 0.04046773165464401, -0.033333394676446915, 0.0001672464277362451, -0.05355534702539444, -0.0023971230257302523, 0.005122264847159386, -0.00759156234562397, 0.041912976652383804, 0.04628387838602066, 0.025481609627604485, -0.01923261769115925, 0.02244250848889351, 0.10145243257284164, -0.013058533892035484, 0.02930012159049511, 0.06103603169322014, -0.01586143672466278, -0.11758815497159958, -0.009395361877977848, 0.042774975299835205, -0.016726842150092125, 0.0007441634079441428, 0.06662999093532562, 0.03239661082625389, -0.012581667862832546, -0.02190907672047615, -0.07581199705600739, -0.026754073798656464, -0.06199290230870247, -0.024770338088274002, 0.09787404537200928, -0.0052639879286289215, 0.04416590556502342, -0.010906344279646873, -0.027739809826016426, -0.02111034467816353, 0.04731588438153267, -0.07391781359910965, -0.01694886013865471, -0.03093162178993225, 0.00350355077534914, 0.03511990234255791, 0.05026904493570328, -0.05173743516206741, -0.031390558928251266, -0.03866967558860779, -0.037763651460409164, -0.014157826080918312, 0.0548536591231823, 0.029011568054556847, -0.06977943331003189, -0.04122458025813103, 0.008808417245745659, 0.008196457289159298, -0.039649900048971176, -0.012857821770012379, 0.05127771943807602, -0.07342078536748886, 0.004529421683400869, 0.08110985904932022, 0.04688338190317154, -0.04999660328030586, -0.004738497082144022, -0.030113674700260162, -0.0005083419382572174, -0.01867070235311985, -0.022146577015519142, -0.05515959858894348, -0.004552030004560947, 0.048024263232946396, -0.07353775203227997, -0.028235573321580887, -0.037116143852472305, 0.02143215946853161, 0.05368155241012573, -0.031469326466321945, 0.03990773856639862, -0.00424364535138011, -0.017417434602975845, -0.03257722780108452, -0.03297894448041916, -0.013749266043305397, -0.025819720700383186, 0.04287891462445259, -0.010419960133731365, 0.0912797749042511, 0.039132311940193176, 0.0031215131748467684, 0.023610543459653854, -0.053681742399930954, -0.005335242487490177, 0.00007086370169417933, -0.04496809467673302, -0.011095218360424042, 0.012948327697813511, -0.05345350503921509, 0.018652217462658882, 0.07981134951114655, 0.011756794527173042, -0.06189174950122833, -0.018346412107348442, 0.0068818372674286366, 0.03684637323021889, 0.03947239741683006, 0.009474365040659904, -0.043976571410894394, -0.039692528545856476, -0.015155261382460594, -0.28776219487190247, 0.009336602874100208, -0.02256172150373459, -0.0005906174774281681, 0.0009825750021263957, -0.04027387127280235, 0.001956646330654621, -0.008051646873354912, -0.0181953813880682, 0.06229348108172417, 0.04863428696990013, -0.02506326697766781, 0.019963428378105164, 0.03479385748505592, -0.046519290655851364, 0.08842482417821884, -0.00843763630837202, -0.01445816271007061, -0.01665848307311535, 0.028435861691832542, -0.0360952764749527, -0.009759856387972832, -0.03965800628066063, -0.08440758287906647, 0.005240065511316061, -0.012438710778951645, 0.23641672730445862, 0.048703305423259735, 0.03482156619429588, -0.040633879601955414, 0.04019778221845627, 0.010441153310239315, 0.014474285766482353, -0.13206832110881805, 0.07161209732294083, -0.006679953541606665, 0.04168855398893356, 0.026398446410894394, 0.027315480634570122, -0.009245330467820168, -0.009725667536258698, 0.036438554525375366, 0.0004558368818834424, -0.06680759787559509, 0.030099932104349136, -0.01399405486881733, -0.02469385229051113, -0.03704129159450531, -0.017371606081724167, 0.07119574397802353, 0.04699518159031868, 0.02898240275681019, 0.06532363593578339, 0.04538590461015701, -0.009807285852730274, -0.061135463416576385, -0.056206125766038895, 0.01710524596273899, -0.0036527863703668118, 0.027013149112462997, -0.028900036588311195, -0.03236723318696022, 0.025307895615696907, -0.04392756149172783, 0.010410124436020851, -0.010532534681260586, 0.05784124508500099, -0.04119950160384178, 0.054090313613414764, -0.013257051818072796, 0.01093277893960476, 0.08030726760625839, 0.006239272188395262, 0.034261494874954224, 0.01732652448117733, 0.06876178085803986, -0.012520908378064632, -0.030796030536293983, -0.027538705617189407, -0.015310107730329037, 0.03078729845583439, -0.02235192060470581, 0.04801066964864731, 0.002460382878780365, 0.058030836284160614, 0.022571522742509842, 0.017838096246123314, -0.004422878846526146, 0.04598983749747276, -0.03323661908507347, -0.004119378514587879, -0.015473750419914722, -0.03842238709330559, -0.08450871706008911, 0.032411061227321625, 0.007213739678263664, -0.29124709963798523, 0.056118112057447433, 0.015223650261759758, 0.02286507561802864, 0.008273580111563206, 0.053515058010816574, 0.06696730852127075, -0.020669039338827133, -0.033980052918195724, 0.006888706702739, 0.04204144328832626, -0.03789500892162323, 0.013261880725622177, 0.022325508296489716, -0.007306838408112526, 0.07087352871894836, 0.039393115788698196, -0.04044302925467491, 0.0625278428196907, -0.058503031730651855, 0.045838285237550735, 0.0661732479929924, 0.22889451682567596, 0.007421709131449461, 0.029857991263270378, 0.05549772083759308, 0.009224697947502136, 0.04146024212241173, 0.07211528718471527, 0.03842537850141525, 0.04081512615084648, 0.024037262424826622, 0.1044943705201149, -0.05436107888817787, 0.059651948511600494, 0.0036850941833108664, -0.04489399865269661, 0.008361592888832092, 0.013772963546216488, -0.03154832869768143, -0.04080059379339218, 0.000732998363673687, -0.06429845094680786, 0.0016134354518726468, 0.12488900125026703, -0.05724769085645676, -0.06236168369650841, -0.07041773945093155, -0.03441465646028519, 0.015837999060750008, -0.035468827933073044, -0.015352047979831696, -0.041115857660770416, -0.03197949752211571, 0.01884576678276062, 0.039735522121191025, -0.024237558245658875, -0.008591214194893837, -0.042233385145664215, -0.03935103490948677, 0.013228556141257286, -0.07903973758220673, 0.011644724756479263, 0.05265804007649422, -0.008611930534243584 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
Restart your server and now try to get a single movie result by navigating to **localhost:8080/movies/{id}**. ![Single Movie Response Endpoint][10] For our final endpoint, we are allowing the end user to provide an aggregation pipeline that we will execute on the `mflix` collection. The user can provide any aggregation they want. To test this endpoint, we’ll make a POST request to **localhost:8080/movies/aggregations**. In the body of the request, we’ll include our aggregation pipeline. ![Postman Aggregation Endpoint in MongoDB][11]
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.05939396843314171, -0.022953838109970093, 0.028358299285173416, -0.015371912159025669, 0.0005927639431320131, -0.003748072776943445, 0.00951032992452383, 0.008553973399102688, -0.02210836112499237, -0.034420326352119446, 0.03477118909358978, -0.07884728908538818, 0.032459378242492676, 0.02413351647555828, 0.001778675359673798, 0.00656379759311676, 0.029483847320079803, -0.0062894271686673164, -0.04731651395559311, 0.009408491663634777, 0.02934245951473713, -0.006890406832098961, -0.03779302164912224, -0.06796299666166306, -0.0046889823861420155, 0.0214439295232296, -0.02738514542579651, -0.023237425833940506, -0.04557691514492035, -0.21030107140541077, -0.015990089625120163, -0.049044061452150345, 0.04030859097838402, -0.030295569449663162, 0.028517771512269974, -0.058102212846279144, -0.004764464218169451, 0.02221686951816082, -0.03606993332505226, 0.028975941240787506, 0.05784149467945099, 0.035733237862586975, -0.0016792654059827328, -0.08850790560245514, -0.04390883445739746, -0.07988519966602325, -0.001260684453882277, -0.00036518386332318187, 0.05655670538544655, -0.04765404760837555, 0.03435894846916199, -0.0514393076300621, 0.027180645614862442, 0.03483912721276283, -0.01858406700193882, 0.06078691408038139, 0.001524009509012103, 0.03540888801217079, 0.00011840323713840917, -0.010696961544454098, 0.07151482254266739, 0.030254531651735306, -0.1950555443763733, 0.08521334826946259, 0.0621524304151535, 0.06413213908672333, -0.014140973798930645, -0.00917754601687193, 0.0340585932135582, 0.03566217049956322, -0.05700232461094856, 0.03929453343153, 0.049629293382167816, 0.0677548497915268, 0.013360422104597092, -0.013032102026045322, 0.015694256871938705, -0.034323327243328094, 0.018223300576210022, 0.038476746529340744, -0.03104167990386486, -0.052272796630859375, -0.05576376989483833, 0.003181499196216464, 0.0009851381182670593, -0.035567089915275574, 0.06716684997081757, -0.014779875054955482, 0.06074407324194908, 0.030585482716560364, -0.03464595228433609, 0.03718383610248566, -0.013041161000728607, 0.034666795283555984, -0.06971772015094757, 0.0037360533606261015, 0.060805659741163254, 0.03123829886317253, -0.014551355503499508, 0.24651984870433807, -0.007644886616617441, 0.011084957048296928, 0.03720219060778618, -0.04805557802319527, 0.029156219214200974, -0.03365947678685188, -0.06967400759458542, 0.00610763393342495, 0.020835598930716515, 0.027905508875846863, 0.01537092961370945, -0.04127909615635872, 0.049801893532276154, -0.043700456619262695, 0.03951554000377655, 0.015467469580471516, -0.012946989387273788, 0.04884050041437149, -0.03981702774763107, -0.03624691069126129, 0.0133220748975873, 0.017262762412428856, 0.024854110553860664, -0.06688514351844788, 0.026811156421899796, -0.08310981839895248, 0.07080138474702835, 0.12632305920124054, 0.04199334233999252, -0.02022872492671013, 0.049040790647268295, -0.004686260130256414, -0.06646175682544708, -0.038546428084373474, 0.002517885761335492, 0.06097404658794403, -0.01239761896431446, 0.008265828713774681, 0.018004683777689934, -0.002505963435396552, -0.04828265681862831, -0.10995770245790482, -0.04741006717085838, -0.10737690329551697, -0.004650169983506203, 0.13723576068878174, -0.001176237128674984, 0.04645349830389023, -0.04109556972980499, -0.05390247702598572, -0.039721712470054626, 0.048758503049612045, -0.05636998638510704, -0.0171105545014143, -0.03903007134795189, 0.025358986109495163, 0.05936208367347717, 0.07963434606790543, -0.03724471479654312, 0.03080666996538639, -0.06695127487182617, -0.028028493747115135, -0.04008723422884941, 0.06785646080970764, 0.04905276745557785, -0.08380312472581863, -0.0021107045467942953, 0.03255460038781166, -0.04730610176920891, -0.036335863173007965, -0.016440527513623238, 0.0025873135309666395, -0.04197497293353081, -0.007961520925164223, 0.06406500190496445, 0.009254968725144863, -0.04076318442821503, 0.022190416231751442, 0.014435888268053532, -0.006320335902273655, -0.017333319410681725, -0.041876815259456635, -0.027349716052412987, 0.030483253300189972, 0.04019160568714142, -0.03715177997946739, -0.036204949021339417, -0.04530517756938934, 0.03560556843876839, 0.03196876123547554, -0.07214047759771347, -0.014384918846189976, 0.0019702035933732986, -0.015525834634900093, -0.007069712039083242, -0.03826171159744263, 0.010715626180171967, -0.007140584290027618, 0.05536902695894241, -0.03367316722869873, 0.1073019728064537, 0.0064281499944627285, -0.020953509956598282, 0.051448754966259, -0.02112448960542679, 0.04818732663989067, -0.03670177236199379, -0.029465993866324425, 0.021395504474639893, -0.026531381532549858, -0.05452990531921387, -0.0060688708908855915, 0.06584339588880539, 0.010328428819775581, -0.02068275958299637, 0.011168424040079117, 0.019321780651807785, 0.0017269887030124664, 0.05412736162543297, 0.03138689324259758, 0.02466164529323578, -0.05594893917441368, -0.024651966989040375, -0.2470175176858902, 0.03165798261761665, -0.008464024402201176, -0.06793741881847382, 0.015736261382699013, -0.019695525988936424, 0.034462470561265945, -0.0017722476040944457, 0.02129947580397129, 0.09512131661176682, 0.05795201659202576, 0.009450321085751057, -0.02104935422539711, -0.006970011163502932, 0.014993985183537006, 0.04755296930670738, -0.021310996264219284, 0.020644590258598328, 0.0022644619457423687, -0.0008760156924836338, 0.014014380052685738, -0.051559560000896454, -0.021051647141575813, -0.06020895391702652, 0.060373153537511826, 0.024564607068896294, 0.22821712493896484, 0.07901789993047714, -0.012083734385669231, -0.05684182420372963, 0.060724809765815735, 0.09234946966171265, -0.05764677748084068, -0.0961901992559433, 0.02789643034338951, -0.001880325609818101, 0.04081856459379196, 0.005124766379594803, 0.014739101752638817, -0.01955658569931984, -0.014387331902980804, -0.0019162979442626238, 0.022454744204878807, -0.08377685397863388, -0.01562926545739174, -0.045173149555921555, -0.0427144393324852, 0.02352861873805523, -0.043635234236717224, -0.009150980040431023, 0.02779047191143036, -0.02777152694761753, 0.03739533945918083, 0.004862249828875065, 0.0014951148768886924, 0.01130567118525505, -0.021389134228229523, 0.008998137898743153, -0.0025463115889579058, 0.05335960164666176, -0.006486689671874046, -0.033822305500507355, 0.042441029101610184, -0.0236501507461071, 0.06610895693302155, -0.018897835165262222, -0.025706162676215172, -0.012385925278067589, 0.03367811441421509, -0.04618912562727928, -0.007981499657034874, 0.06074276939034462, -0.013078354299068451, 0.027052519842982292, 0.05628853663802147, 0.06141484156250954, 0.05706661567091942, -0.05148562043905258, -0.020565079525113106, -0.028497379273176193, 0.005504028871655464, -0.061826277524232864, 0.017649902030825615, 0.01791556552052498, 0.05148913338780403, 0.03605381026864052, 0.021547459065914154, -0.0203122366219759, 0.004235632251948118, -0.01086389273405075, 0.031332772225141525, -0.01969260163605213, -0.07520086318254471, -0.06422227621078491, 0.011453679762780666, 0.03055478073656559, -0.2740509510040283, 0.036977581679821014, -0.021596785634756088, 0.04050711169838905, -0.002842219080775976, 0.018298359587788582, 0.045207809656858444, 0.04089118167757988, -0.03854886442422867, 0.035790786147117615, 0.046660639345645905, 0.005765523295849562, 0.03758719563484192, -0.025100065395236015, -0.0074878595769405365, 0.05884634330868721, 0.03041739948093891, -0.009407689794898033, 0.05103609710931778, -0.06340458989143372, 0.038594093173742294, 0.02011563628911972, 0.22359926998615265, -0.0020716525614261627, -0.007647413294762373, 0.03582233563065529, 0.0024074846878647804, 0.029713571071624756, 0.03582034260034561, -0.03536318987607956, 0.0213887020945549, -0.005154353566467762, 0.054365236312150955, -0.06023571640253067, 0.05328855663537979, 0.00521997781470418, -0.044323548674583435, 0.015594557859003544, 0.04604250192642212, -0.0060227117501199245, -0.06316567957401276, -0.027341527864336967, -0.004765646066516638, -0.013222389854490757, 0.05741415545344353, -0.03240371122956276, -0.019767682999372482, -0.05084226280450821, -0.017092743888497353, 0.02017619088292122, -0.08812043815851212, -0.012530454434454441, -0.003619562368839979, 0.039242420345544815, 0.01910560019314289, 0.007358333095908165, -0.046947237104177475, 0.008996239863336086, -0.048075634986162186, -0.011290138587355614, 0.0032070574816316366, -0.026321200653910637, -0.010808054357767105, 0.03472074121236801, 0.007901576347649097 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
![Postman Aggregation Endpoint in MongoDB][11] Let’s run an aggregation to return a count of comedy movies, grouped by year, in descending order. Again, remember aggregations are very powerful and can be abused. You normally would not want to give direct access to the end user to write and run their own aggregations ad hoc within an HTTP request, unless it was for something like an internal tool. Our aggregation pipeline will look like the following: ```json [ {"$match": {"genres": "Comedy"}}, {"$group": { "_id": "$year", "count": {"$sum": 1} }}, {"$sort": {"count": -1}} ] ``` Running this aggregation, we’ll get a result set that looks like this:
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.07401272654533386, -0.0269711185246706, 0.01877683959901333, -0.019535332918167114, 0.03007514216005802, -0.021243993192911148, 0.026631206274032593, -0.004758930765092373, 0.013068437576293945, -0.01688944548368454, 0.03419562056660652, -0.04383700713515282, 0.03483673185110092, 0.03955230489373207, -0.032808568328619, -0.0316915325820446, 0.016950257122516632, 0.04446297138929367, -0.039683181792497635, 0.007137591484934092, 0.024911079555749893, 0.003981499001383781, -0.05833187326788902, -0.06575503200292587, -0.00413620425388217, 0.03889213502407074, -0.05401186645030975, -0.043099403381347656, -0.07971195131540298, -0.21791015565395355, -0.014039088971912861, -0.05130733177065849, 0.05426402390003204, -0.03143300861120224, 0.002309583593159914, -0.031530432403087616, -0.010544570162892342, 0.029568322002887726, -0.06652539223432541, 0.04195208102464676, 0.05364685505628586, 0.01410583034157753, -0.010651868768036366, -0.09501677751541138, -0.06555931270122528, -0.03836045786738396, -0.020089803263545036, 0.00370826106518507, -0.0441267304122448, -0.021898668259382248, 0.02124091237783432, -0.0605912059545517, -0.020750345662236214, 0.03216651827096939, -0.006156010553240776, 0.044853780418634415, -0.011246107518672943, 0.022036369889974594, -0.004376066382974386, -0.015206050127744675, 0.046697426587343216, -0.02937600389122963, -0.1519506573677063, 0.05414216220378876, 0.03853688761591911, 0.053046032786369324, -0.005100310314446688, 0.0015358648961409926, 0.012411655858159065, 0.04414832219481468, -0.017232900485396385, 0.0326266884803772, 0.02341385744512081, 0.046889156103134155, 0.02037077024579048, 0.011010782793164253, -0.013533012941479683, -0.051190976053476334, -0.023172561079263687, 0.036262378096580505, -0.046247199177742004, -0.06807948648929596, -0.04941105842590332, 0.00010041152563644573, 0.025450779125094414, -0.06879248470067978, 0.06958771497011185, -0.044317204505205154, 0.051301971077919006, 0.028283068910241127, -0.030761245638132095, 0.04645068943500519, -0.021325942128896713, 0.018115444108843803, -0.05231811851263046, -0.0030796807259321213, 0.029184849932789803, 0.016789348796010017, 0.024749737232923508, 0.22860001027584076, 0.0015732489991933107, 0.0005029910826124251, 0.03152584657073021, -0.06672295928001404, 0.0020729878451675177, -0.013714865781366825, -0.01983751729130745, -0.041691891849040985, 0.02322031557559967, 0.016249865293502808, 0.013887750916182995, -0.013229312375187874, 0.0739801749587059, -0.07748164236545563, 0.023551713675260544, -0.027774592861533165, 0.013806645758450031, 0.07531500607728958, -0.014189234003424644, -0.04366297274827957, 0.04569924250245094, 0.013798360712826252, 0.0308917798101902, -0.02488149143755436, 0.02499479614198208, -0.08081042021512985, 0.0827098935842514, 0.11108861863613129, 0.052370019257068634, 0.019100317731499672, 0.011522664688527584, 0.0049336072988808155, -0.07468472421169281, -0.03873175010085106, 0.01951662451028824, 0.027321329340338707, -0.0020393775776028633, 0.03017149306833744, 0.054053425788879395, 0.048616357147693634, -0.011618716642260551, -0.07815978676080704, -0.020439164713025093, -0.07682478427886963, -0.036588214337825775, 0.16929911077022552, -0.022320570424199104, 0.03747841715812683, -0.06409312039613724, -0.03612363338470459, -0.01313227228820324, 0.009168338030576706, -0.02830154076218605, -0.033215783536434174, -0.03320750594139099, 0.016463330015540123, 0.05987323075532913, 0.06222778186202049, -0.03889266774058342, 0.02368864044547081, -0.05229123309254646, -0.01576971635222435, -0.0261530801653862, 0.06888914108276367, 0.03355250135064125, -0.08966975659132004, -0.013541423715651035, -0.001863047480583191, -0.003607314545661211, -0.05128546431660652, 0.03017815761268139, 0.03622272610664368, -0.02755214460194111, -0.0015563532942906022, 0.1116214320063591, 0.03737633675336838, -0.006251612678170204, 0.004215482622385025, 0.024276627227663994, -0.022342810407280922, -0.007859591394662857, -0.048252254724502563, -0.07145589590072632, 0.04533379152417183, 0.038434844464063644, -0.0015342464903369546, -0.01307737361639738, -0.03651921823620796, 0.040842823684215546, 0.031981293112039566, -0.046163931488990784, -0.02293417602777481, -0.012942343950271606, -0.0012086692731827497, -0.013109808787703514, -0.01947810873389244, 0.006051068194210529, -0.00007338465366046876, 0.059825729578733444, -0.020671067759394646, 0.024115245789289474, -0.020524458959698677, -0.00882011279463768, 0.045809779316186905, 0.03658866137266159, 0.041443195194005966, -0.01933376118540764, -0.016667285934090614, 0.03984082490205765, -0.008316206745803356, -0.058690864592790604, -0.039205826818943024, 0.04799850657582283, -0.008150509558618069, -0.022749410942196846, 0.011811711825430393, 0.009004279039800167, 0.013416104018688202, 0.041552938520908356, 0.04346843436360359, 0.03697020187973976, -0.09280113130807877, 0.0003833063237834722, -0.25729644298553467, 0.006627046503126621, 0.03675644099712372, -0.004556628875434399, 0.018553601577878, -0.026342615485191345, -0.01180531270802021, -0.0362476222217083, 0.033370573073625565, 0.12197544425725937, 0.045044898986816406, 0.007708664517849684, -0.02494155243039131, 0.02678808383643627, 0.0016373277176171541, 0.07714106142520905, -0.021644581109285355, -0.0034969141706824303, -0.0008872892940416932, 0.02197335660457611, 0.0145228561013937, -0.019713029265403748, -0.010960341431200504, -0.0792861059308052, 0.033606067299842834, 0.007983611896634102, 0.20427881181240082, 0.06168713420629501, -0.03865319490432739, -0.054468125104904175, 0.06164264306426048, 0.0365494042634964, -0.07287196815013885, -0.04265923425555229, 0.02197764627635479, 0.013071984052658081, 0.02107897959649563, -0.020827781409025192, -0.016940880566835403, -0.05070134624838829, -0.038897186517715454, 0.013249578885734081, 0.0021940646693110466, -0.07504317909479141, 0.00031197440694086254, -0.03260761871933937, -0.040956106036901474, 0.028857197612524033, -0.018475741147994995, -0.013539009727537632, 0.03296201676130295, -0.030197421088814735, 0.04312470182776451, 0.020177612081170082, -0.01981896534562111, -0.023962313309311867, -0.05822104588150978, 0.005913077387958765, -0.016799813136458397, 0.04274386540055275, -0.008589806035161018, -0.047744669020175934, 0.03846181929111481, -0.005806224886327982, 0.05106981098651886, 0.010797971859574318, -0.015338264405727386, 0.0184917189180851, -0.010018374770879745, -0.03162413462996483, -0.017821824178099632, 0.05423032492399216, -0.028560049831867218, 0.06324850022792816, 0.050152167677879333, 0.06584755331277847, 0.0241962019354105, -0.022465527057647705, -0.0067360857501626015, -0.03976946696639061, 0.0345938615500927, -0.07123521715402603, 0.03327539935708046, 0.034443579614162445, 0.05638548731803894, 0.05664581432938576, 0.012950214557349682, -0.014702025800943375, -0.006839871406555176, -0.007184063550084829, 0.028076475486159325, -0.002484732773154974, -0.08838997781276703, -0.04584028571844101, 0.012516072951257229, 0.020773252472281456, -0.27335190773010254, 0.05088020861148834, -0.0491609126329422, 0.03273257240653038, 0.029493339359760284, 0.043645381927490234, 0.050098270177841187, 0.04530123993754387, -0.0019116197945550084, 0.03614000603556633, 0.04896414652466774, 0.062128107994794846, 0.019351022318005562, -0.059712257236242294, 0.00035586318699643016, 0.04763441160321236, -0.0002031011536018923, -0.037756312638521194, 0.06376170367002487, -0.04545488953590393, 0.04505203664302826, 0.02678023651242256, 0.26184824109077454, 0.002947129774838686, -0.026789775118231773, 0.01694686897099018, 0.030223963782191277, 0.03724553808569908, 0.046502478420734406, -0.026950348168611526, 0.02032911404967308, -0.010819405317306519, 0.11938569694757462, -0.05101737007498741, 0.05760955438017845, 0.027324609458446503, -0.0397699698805809, 0.018621345981955528, 0.014635701663792133, -0.02761591412127018, -0.0993504449725151, -0.01333262026309967, -0.0061020683497190475, 0.009049498476088047, 0.08571036159992218, -0.013640403747558594, -0.059789299964904785, -0.06968186050653458, 0.02383628487586975, 0.03894823044538498, -0.07094917446374893, -0.03620243817567825, -0.0025254825595766306, 0.023660846054553986, 0.03537430241703987, -0.006171016953885555, -0.02502165362238884, 0.002462766133248806, -0.03253668546676636, -0.021992193534970284, -0.01798657700419426, -0.04977209493517876, -0.02962602861225605, 0.06249190494418144, -0.005035455338656902 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
Running this aggregation, we’ll get a result set that looks like this: ```json [ { "_id": 2014, "count": 287 }, { "_id": 2013, "count": 286 }, { "_id": 2009, "count": 268 }, { "_id": 2011, "count": 263 }, { "_id": 2006, "count": 260 }, ... ] ``` It seems 2014 was a big year for comedy. If you are not familiar with how aggregations work, you can check out the following resources: - [Introduction to the MongoDB Aggregation Framework - MongoDB Aggregation Pipeline Queries vs SQL Queries - A Better MongoDB Aggregation Experience via Compass
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.06820350140333176, -0.029377540573477745, 0.023366276174783707, -0.018552958965301514, 0.02511957287788391, -0.012584185227751732, 0.04258553683757782, 0.023017894476652145, 0.031415607780218124, -0.00668705627322197, 0.023607298731803894, -0.034718867391347885, 0.04244041070342064, 0.024339986965060234, -0.0863889753818512, 0.009063449688255787, -0.009400851093232632, 0.019059352576732635, -0.06367231905460358, 0.03085394576191902, 0.01104856189340353, 0.00655052624642849, -0.034590091556310654, -0.05742936581373215, 0.022338826209306717, 0.09766260534524918, -0.02303747832775116, -0.05111933872103691, -0.045339275151491165, -0.23143407702445984, 0.008631570264697075, -0.04480108246207237, 0.058899831026792526, -0.02875865437090397, 0.017004964873194695, -0.018319804221391678, -0.021265821531414986, 0.06314317137002945, -0.050304774194955826, 0.08858339488506317, 0.06680922210216522, -0.010304965078830719, -0.036078523844480515, -0.09417324513196945, -0.07633554935455322, -0.04520426318049431, -0.03897923603653908, -0.017646919935941696, -0.026741866022348404, -0.0040106032975018024, 0.014248786494135857, -0.04446029290556908, -0.018248580396175385, 0.007551474962383509, 0.025469841435551643, 0.0669621005654335, -0.0015241161454468966, 0.030535779893398285, -0.01225779764354229, -0.01141343917697668, 0.04608273506164551, -0.022944604977965355, -0.14342837035655975, 0.08021712303161621, 0.018472684547305107, 0.024364806711673737, -0.03266928717494011, -0.006563755217939615, 0.013400182127952576, 0.03773405775427818, 0.03228053078055382, 0.015035289339721203, 0.016329100355505943, 0.017084263265132904, 0.02202778123319149, -0.012620586901903152, -0.01598707213997841, -0.0307000819593668, 0.010206865146756172, 0.04835957661271095, -0.05287725850939751, -0.03524378687143326, -0.03570938855409622, -0.03037223033607006, -0.00741335516795516, -0.0588003545999527, 0.028681496158242226, -0.05058805271983147, 0.05710858851671219, 0.02701663412153721, -0.008183234371244907, 0.050706978887319565, -0.014308067038655281, 0.01558380201458931, -0.06072071194648743, 0.011881561949849129, 0.02177058905363083, 0.014446241781115532, 0.025342050939798355, 0.23221397399902344, -0.02951514720916748, -0.0010809069499373436, 0.007862156257033348, -0.041582006961107254, -0.009401138871908188, -0.028927261009812355, -0.02712542936205864, -0.06754137575626373, 0.0015334116760641336, 0.02913791500031948, 0.012519706040620804, 0.004059230908751488, 0.06018667668104172, -0.05886302888393402, -0.009482674300670624, -0.040792811661958694, 0.014492384158074856, 0.07177222520112991, -0.0094106774777174, -0.004718158394098282, 0.045246709138154984, 0.043608441948890686, 0.014118839055299759, -0.020466182380914688, 0.013469078578054905, 0.01075492613017559, 0.06598442792892456, 0.12864342331886292, 0.020309166982769966, 0.004137157462537289, 0.006503450684249401, -0.00686319824308157, -0.08634854108095169, -0.023676728829741478, 0.002908017486333847, 0.007607695646584034, 0.00034988121478818357, 0.035355400294065475, 0.03219985589385033, 0.08792736381292343, 0.0017550071934238076, -0.07836265861988068, -0.007636521477252245, -0.08036380261182785, -0.0019863592460751534, 0.14248670637607574, -0.059872809797525406, 0.04675034433603287, -0.03425035625696182, -0.026058265939354897, -0.02002592384815216, 0.02431018464267254, 0.0007001819321885705, -0.0447046123445034, -0.02272484265267849, 0.05294821783900261, 0.05772559717297554, 0.053373340517282486, -0.03508704900741577, 0.01252962276339531, -0.03165719658136368, -0.045421600341796875, -0.04719007387757301, 0.08136986196041107, 0.005282220896333456, -0.12980853021144867, -0.010130125097930431, 0.008302107453346252, -0.011723184958100319, -0.05996017903089523, 0.037753935903310776, 0.04351363703608513, -0.049446478486061096, 0.02661655656993389, 0.11102186143398285, 0.02227671630680561, -0.011440061964094639, -0.009010749869048595, 0.02870573289692402, -0.013036294840276241, 0.00909324549138546, -0.008039191365242004, -0.07204293459653854, 0.034149475395679474, 0.01351945474743843, -0.027657533064484596, -0.00034782756119966507, -0.03421420976519585, 0.05144096165895462, 0.035827089101076126, -0.033000022172927856, 0.0004737557901535183, -0.04381818696856499, 0.03388793393969536, 0.005613085348159075, -0.04054410383105278, -0.0017112989444285631, -0.03873058408498764, 0.05211947113275528, -0.03831033036112785, 0.025200048461556435, -0.003254321403801441, 0.0067040747962892056, 0.038208141922950745, 0.041881952434778214, 0.0035845472011715174, -0.036707453429698944, -0.006693054456263781, 0.026870273053646088, 0.023195628076791763, -0.07826586812734604, -0.001163077657110989, 0.026306504383683205, -0.009029158391058445, -0.031492628157138824, -0.013331660069525242, -0.0014356696046888828, 0.013018230907619, 0.004649616312235594, 0.017514897510409355, 0.023979127407073975, -0.10060252249240875, -0.0031845788471400738, -0.2580711245536804, 0.012294286862015724, 0.05510483309626579, -0.023574452847242355, 0.01751244254410267, -0.02877589873969555, -0.01441781222820282, -0.02980879880487919, 0.0017065530410036445, 0.11210761964321136, 0.024063702672719955, -0.0012498019495978951, -0.01419864222407341, 0.015376961790025234, -0.04323630779981613, 0.08772581070661545, 0.014124548994004726, 0.02264745533466339, -0.020165108144283295, -0.006520533002912998, 0.020614637061953545, 0.014113700948655605, -0.03827841952443123, -0.09153459966182709, 0.03244322910904884, -0.004981149919331074, 0.20562177896499634, 0.048738252371549606, -0.033230867236852646, -0.06800365447998047, 0.05009261146187782, 0.03714735060930252, -0.06301596015691757, -0.04276207834482193, 0.045793648809194565, 0.019027072936296463, -0.010961519554257393, -0.0022227244917303324, -0.0427042581140995, -0.0396939180791378, -0.025425611063838005, 0.021440403535962105, 0.0015312604373320937, -0.06963781267404556, 0.012304773554205894, -0.04733562842011452, -0.00808415561914444, 0.002658545272424817, -0.03337563946843147, 0.005021099932491779, 0.03296119347214699, 0.03376344218850136, 0.05985252186655998, 0.0064600612968206406, -0.01423804834485054, -0.0129387890920043, -0.047744762152433395, -0.0128869554027915, -0.023718122392892838, 0.06411458551883698, 0.001013755681924522, -0.018417147919535637, 0.001094078179448843, 0.00012939656153321266, 0.05008479207754135, -0.000004910661118628923, 0.004748447798192501, 0.01304986048489809, -0.05342622473835945, -0.05937938019633293, -0.03203224390745163, 0.05288098379969597, -0.020338814705610275, 0.009288795292377472, 0.049256082624197006, 0.026138363406062126, -0.0006408024928532541, -0.03720490261912346, 0.019174888730049133, -0.01597185805439949, 0.03543619439005852, -0.055223844945430756, 0.06449273973703384, 0.02470368519425392, 0.07267290353775024, 0.06538602709770203, 0.03514965623617172, 0.004518471658229828, 0.0011265664361417294, -0.04610474407672882, 0.04176119342446327, 0.01245200727134943, -0.06768792867660522, -0.055203720927238464, 0.016058217734098434, 0.0322503037750721, -0.27957016229629517, 0.03188767656683922, -0.044617053121328354, 0.02563040517270565, 0.026968233287334442, 0.032199837267398834, 0.030934570357203484, 0.02970162034034729, 0.0022955762688070536, 0.005553463939577341, 0.040522634983062744, 0.0795910507440567, 0.006776188500225544, -0.05555080622434616, -0.00916726142168045, 0.047413259744644165, 0.000702978577464819, -0.06177195906639099, 0.06081565096974373, -0.01978854276239872, 0.06758426129817963, 0.06947115063667297, 0.24991737306118011, 0.02657621167600155, -0.020829245448112488, 0.047873858362436295, 0.03656088933348656, 0.023753641173243523, 0.037026241421699524, 0.003860008204355836, 0.013185272924602032, -0.000263483525486663, 0.09143504500389099, -0.006770689506083727, 0.03516130521893501, 0.032862789928913116, -0.05509349703788757, 0.014719356782734394, -0.0030960729345679283, -0.01582077331840992, -0.0598386786878109, 0.0010369265219196677, -0.02162090130150318, 0.030743498355150223, 0.11461342871189117, -0.04446181654930115, -0.06809987872838974, -0.09898155927658081, 0.024687988683581352, 0.006945120636373758, -0.0643996000289917, -0.025981774553656578, -0.01731186732649803, -0.005606867838650942, 0.0310133658349514, 0.009549192152917385, -0.021945159882307053, -0.011645997874438763, -0.05694488435983658, -0.02359098568558693, -0.01095854677259922, -0.026951864361763, -0.028133835643529892, 0.04067153483629227, -0.002443047007545829 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
- [Introduction to the MongoDB Aggregation Framework - MongoDB Aggregation Pipeline Queries vs SQL Queries - A Better MongoDB Aggregation Experience via Compass Additionally, you can ask Cody for a specific explanation about how our `aggregateMovies` function works to help you further understand how the code is implemented using the Cody `/explain` command. . And if you have any questions or comments, let’s continue the conversation in our developer forums! The entire code for our application is above, so there is no GitHub repo for this simple application. Happy coding.
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.05043232440948486, -0.040659449994564056, -0.0008779990021139383, -0.01649775356054306, 0.028525717556476593, -0.02412003092467785, 0.011591386049985886, 0.015299403108656406, -0.015202571637928486, -0.011851189658045769, -0.009630112908780575, -0.06817132234573364, 0.05715791881084442, 0.024973860010504723, -0.030025769025087357, -0.002727566985413432, 0.012146005406975746, 0.006302025634795427, -0.0666676014661789, 0.03516162186861038, 0.023096203804016113, -0.007734506856650114, -0.06494233757257462, -0.06711213290691376, 0.04092875495553017, 0.06914912909269333, -0.04733073711395264, -0.02313021384179592, -0.036053311079740524, -0.21466772258281708, 0.0039052406791597605, -0.05935202166438103, 0.07544304430484772, -0.023803509771823883, -0.004871787037700415, -0.04380742460489273, 0.03402112424373627, 0.03338857367634773, -0.060179948806762695, -0.0028545085806399584, 0.03262193873524666, 0.004106482490897179, 0.004990050569176674, -0.04716482758522034, -0.06047353148460388, -0.08537443727254868, -0.00846850499510765, -0.01808406040072441, -0.023869890719652176, 0.00089604826644063, -0.006183404941111803, -0.027719613164663315, -0.036328308284282684, 0.03410309553146362, 0.008436331525444984, 0.05118563398718834, -0.008691828697919846, 0.04879632219672203, -0.0026373150758445263, 0.008794935420155525, 0.0558648444712162, -0.010461262427270412, -0.17224359512329102, 0.11183840036392212, 0.05560807138681412, 0.0748491883277893, 0.0004057205223944038, -0.014017986133694649, 0.03565051779150963, 0.062241677194833755, -0.02071320451796055, 0.032135844230651855, 0.02693014033138752, 0.03210218995809555, -0.017019037157297134, -0.051497478038072586, 0.0024493858218193054, -0.02662070281803608, -0.006345265079289675, 0.020557885989546776, -0.06499423086643219, -0.03627336397767067, -0.036452632397413254, -0.011972240172326565, -0.0032923256512731314, -0.039784420281648636, 0.08416405320167542, -0.055114857852458954, 0.03674823418259621, 0.015689028427004814, 0.0034618994686752558, 0.021954776719212532, 0.004035698715597391, 0.022685537114739418, -0.050996508449316025, -0.0037564942613244057, 0.04565838351845741, 0.03418166935443878, -0.008215890266001225, 0.2350359708070755, -0.01954278163611889, 0.006588455755263567, 0.013680057600140572, -0.023308247327804565, 0.01916581392288208, -0.0215008407831192, -0.022554712370038033, -0.042802680283784866, 0.024906355887651443, 0.017239708453416824, -0.024772917851805687, -0.004574914928525686, 0.04585323855280876, -0.08569994568824768, 0.011709342710673809, -0.02226148545742035, 0.01945481263101101, 0.0403158999979496, -0.0233488529920578, 0.0012198052136227489, 0.0008767523686401546, 0.025773245841264725, 0.03035850077867508, -0.010697780176997185, 0.023511311039328575, -0.06969834864139557, 0.03849191591143608, 0.1001710593700409, 0.019267844036221504, 0.02107526734471321, 0.0425078421831131, -0.0023538677487522364, -0.09512970596551895, -0.00888341199606657, 0.019574396312236786, 0.016969460994005203, -0.009221523068845272, 0.011333083733916283, 0.043559592217206955, 0.031922899186611176, -0.02071167342364788, -0.061922065913677216, -0.005435168277472258, -0.09561316668987274, -0.05763094872236252, 0.10580997914075851, -0.030551496893167496, 0.031039519235491753, -0.06581861525774002, -0.03329654783010483, -0.01301809586584568, 0.038118910044431686, -0.013674884103238583, -0.0043336739763617516, -0.03394994139671326, 0.021977165713906288, 0.07456491887569427, 0.07072031497955322, -0.05645042285323143, 0.047691527754068375, -0.07195249199867249, -0.04012860730290413, -0.005661635659635067, 0.08037152886390686, 0.006260521709918976, -0.1559130698442459, -0.010391649790108204, 0.020367275923490524, -0.023993132635951042, -0.04175329580903053, 0.03331153094768524, 0.006188148632645607, -0.036799535155296326, 0.0302314180880785, 0.09591414034366608, 0.0011255750432610512, -0.03239056095480919, -0.012823392637073994, -0.005376970395445824, -0.0024671193677932024, 0.03234565258026123, -0.025627784430980682, -0.036133769899606705, 0.05802890285849571, 0.020118338987231255, -0.031411875039339066, -0.0416131354868412, -0.031704649329185486, 0.05806286260485649, 0.04801299050450325, -0.041853275150060654, -0.041815344244241714, 0.0011090196203440428, -0.009288673289120197, -0.04186278581619263, -0.02737458050251007, 0.013547408394515514, -0.022866755723953247, 0.04716109856963158, -0.009112644009292126, 0.048587359488010406, 0.020343812182545662, -0.0028695326764136553, 0.04053133353590965, 0.01362802367657423, 0.0492686964571476, -0.021034471690654755, -0.04371640458703041, 0.012135756202042103, -0.004733501933515072, -0.03826632350683212, -0.003507952904328704, -0.0156024731695652, -0.021390343084931374, -0.04894592985510826, -0.013079277239739895, 0.014617901295423508, 0.027974655851721764, 0.038283821195364, 0.040802013128995895, 0.0034277571830898523, -0.049167461693286896, -0.0014486957807093859, -0.2613339126110077, 0.023657619953155518, 0.017878418788313866, 0.013007909059524536, 0.0316271148622036, -0.06477875262498856, 0.007773096673190594, -0.024042479693889618, -0.02552076429128647, 0.09957260638475418, 0.02045230008661747, 0.009267712943255901, -0.025041712448000908, -0.024745222181081772, -0.020242655649781227, 0.082800954580307, 0.0037940542679280043, 0.015476175583899021, -0.03012126497924328, -0.005727649666368961, -0.007514121476560831, -0.009302455931901932, -0.0007627298473380506, -0.12687477469444275, 0.030320370569825172, 0.022808028385043144, 0.18658889830112457, 0.024964336305856705, -0.008657598868012428, -0.062327295541763306, 0.061033010482788086, 0.04669841006398201, -0.01770142652094364, -0.07422804087400436, 0.05259375274181366, 0.012658045627176762, 0.03421413153409958, 0.012063035741448402, -0.0034471105318516493, -0.052283525466918945, -0.03525450825691223, 0.044451262801885605, 0.0326630137860775, -0.09454282373189926, -0.03601452708244324, -0.034934692084789276, -0.04072515293955803, 0.016244223341345787, -0.021496877074241638, 0.025858072564005852, 0.006201721262186766, 0.010972053743898869, 0.056010544300079346, 0.02696826495230198, -0.0017080566613003612, -0.010310602374374866, -0.06043320894241333, 0.030959773808717728, -0.009154073894023895, 0.09815922379493713, -0.003923420328646898, -0.03934133052825928, 0.03749211132526398, -0.02937210537493229, 0.09224134683609009, -0.007688107900321484, 0.008629980497062206, 0.014589237980544567, 0.015325295738875866, -0.02356605976819992, -0.03129002824425697, 0.06081528216600418, -0.05316333845257759, 0.012451267801225185, 0.026939552277326584, 0.0557512603700161, 0.040893200784921646, -0.0116886580362916, 0.0022700747940689325, -0.06055682897567749, 0.046951401978731155, -0.034254249185323715, 0.017646024003624916, -0.004623937886208296, 0.05985310301184654, 0.03679914027452469, 0.05566423386335373, -0.018924294039607048, -0.0005688272649422288, -0.014737043529748917, 0.004001404158771038, -0.02801726758480072, -0.04542193189263344, -0.05522523075342178, -0.01916140876710415, -0.0023369076661765575, -0.2939883768558502, 0.037426646798849106, 0.001142687862738967, 0.015132862143218517, 0.010809879750013351, 0.0044313776306807995, 0.051472004503011703, 0.03772829473018646, -0.001674868748523295, 0.014154626987874508, 0.02437363564968109, 0.05774402618408203, 0.023630930110812187, -0.019485697150230408, 0.0007598703377880156, 0.052421934902668, 0.056646376848220825, -0.029228443279862404, 0.04563555866479874, -0.04129285365343094, 0.07137539982795715, 0.05471464991569519, 0.25213927030563354, 0.018125994130969048, 0.001585146295838058, 0.02471582032740116, 0.0071336692199110985, -0.00901256874203682, 0.04131428152322769, 0.00018459977582097054, 0.0070081050507724285, 0.001548220869153738, 0.10934152454137802, -0.05363365635275841, 0.03490111604332924, 0.052652668207883835, -0.02479790337383747, 0.04644029587507248, 0.0559731163084507, -0.028427885845303535, -0.06177752465009689, 0.0036108014173805714, -0.0157619621604681, 0.01751723885536194, 0.08902745693922043, -0.024776246398687363, -0.05113975331187248, -0.09459219872951508, 0.011118014343082905, 0.02976345270872116, -0.09769494086503983, -0.03241879492998123, -0.01084077451378107, 0.014044498093426228, 0.03479430451989174, -0.0003073686093557626, -0.03630952537059784, 0.007149380631744862, -0.02388058602809906, -0.032068345695734024, 0.02141941897571087, -0.05186155065894127, 0.001867947750724852, 0.059633687138557434, -0.008419401943683624 ]
devcenter
https://www.mongodb.com/developer/products/mongodb/build-go-web-application-gin-mongodb-help-ai
created
[1]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt123181346af4c7e6/65148770b25810649e804636/eVB87PA.gif [2]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt3df7c0149a4824ac/6514820f4f2fa85e60699bf8/image4.png [3]: https://images.contentstack.io/v3/assets/blt39790b633ee0d5a7/blt6a72c368f716c7c2/65148238a5f15d7388fc754a/image2.png
md
{ "tags": [ "MongoDB", "Go" ], "pageDescription": "Learn how to build a web application with the Gin framework for Go and MongoDB using the help of Cody AI from Sourcegraph.", "contentType": "Tutorial" }
How to Build a Go Web Application with Gin, MongoDB, and with the Help of AI
2024-05-20T17:32:23.500Z
[ -0.03157740458846092, -0.013073869980871677, 0.028578205034136772, -0.010271021164953709, 0.03574735298752785, 0.03192337602376938, -0.0028953172732144594, 0.03383856266736984, -0.0016590297454968095, -0.0314883254468441, 0.014228236861526966, -0.09247218072414398, 0.0219525545835495, 0.018502777442336082, 0.04508088901638985, -0.01729070022702217, -0.005939625669270754, 0.01983642391860485, -0.071016326546669, 0.03079266846179962, 0.05239114165306091, -0.005780345760285854, 0.018416501581668854, -0.0556257925927639, -0.007154236081987619, 0.04076481610536575, -0.019369689747691154, -0.004033024422824383, -0.03599921986460686, -0.20894552767276764, -0.0011669673258438706, -0.06897860020399094, 0.0328865572810173, -0.05379081517457962, 0.010591790080070496, -0.021336082369089127, -0.036847833544015884, 0.07316605001688004, -0.04648219794034958, 0.02564086951315403, 0.03327053040266037, -0.035476699471473694, -0.05024879053235054, -0.0829610526561737, -0.007991901598870754, -0.06316659599542618, -0.02715248428285122, -0.013584950007498264, 0.021964292973279953, -0.042520806193351746, 0.010336498729884624, -0.03378479182720184, -0.003494485979899764, 0.03796195238828659, 0.008117245510220528, 0.024360686540603638, 0.06441501528024673, 0.03546540439128876, 0.012066843919456005, 0.04440014064311981, 0.0049500479362905025, 0.07454803586006165, -0.22301898896694183, 0.10043487697839737, 0.0554276667535305, 0.023595981299877167, -0.04458601400256157, -0.0037624004762619734, 0.01650152914226055, 0.03618680685758591, -0.025463612750172615, 0.03117893822491169, 0.02878493070602417, 0.02579820342361927, -0.0038011479191482067, -0.06005140021443367, -0.03523235395550728, -0.005429669748991728, -0.04563682898879051, -0.05302480235695839, -0.011933183297514915, -0.0015245245303958654, 0.01232767105102539, -0.008522995747625828, 0.0210659708827734, -0.011768292635679245, -0.027605939656496048, -0.06898834556341171, 0.0377856008708477, 0.032421987503767014, -0.010709088295698166, -0.002014890080317855, 0.019486356526613235, 0.026560775935649872, -0.07592947781085968, -0.010120755061507225, 0.023686015978455544, 0.00860061775892973, -0.012575346976518631, 0.183401957154274, -0.06258046627044678, 0.03153495863080025, 0.07425487041473389, -0.0025429853703826666, 0.04505838826298714, -0.04999609664082527, -0.020008960738778114, -0.054641637951135635, -0.02371875010430813, 0.06381513178348541, 0.021766413003206253, -0.018103230744600296, 0.029850024729967117, -0.05318517982959747, 0.03802864998579025, 0.007652847561985254, 0.011905459687113762, 0.021303510293364525, -0.02707034908235073, -0.04109622910618782, -0.02725912258028984, 0.020970430225133896, 0.04685640707612038, 0.0015771661419421434, 0.03395926579833031, -0.0491996668279171, 0.04763335362076759, 0.07680151611566544, 0.06019744649529457, 0.06389112025499344, 0.05064462870359421, 0.006678877864032984, 0.0019597674254328012, -0.010030836798250675, -0.013840898871421814, 0.03361959010362625, 0.006252455059438944, -0.011608504690229893, 0.00643004197627306, -0.03840237483382225, -0.017952069640159607, -0.14644302427768707, -0.003052797168493271, -0.10802660882472992, 0.017639704048633575, 0.0861397311091423, -0.02548185922205448, 0.026754412800073624, -0.07341328263282776, -0.006505221128463745, 0.0026248800568282604, 0.04853043705224991, -0.019349616020917892, 0.0002597364946268499, 0.027642300352454185, 0.025077663362026215, 0.06175045296549797, 0.08723033964633942, -0.023934656754136086, -0.030026216059923172, -0.0055800206027925014, -0.05459929257631302, -0.04540544003248215, 0.0985649898648262, 0.026558510959148407, -0.11939053237438202, -0.018070053309202194, -0.007279831916093826, 0.013131152838468552, -0.005958442576229572, -0.0219418965280056, 0.052866142243146896, -0.03658105432987213, -0.015377404168248177, 0.11284132301807404, 0.03064465895295143, -0.04239429160952568, 0.003937944769859314, 0.03643925115466118, 0.03025319054722786, 0.015020331367850304, -0.05391541123390198, -0.04134277626872063, 0.0798616111278534, 0.004833404906094074, -0.08700403571128845, 0.02629106119275093, -0.03654886409640312, 0.049219761043787, 0.08604224026203156, -0.0066244774498045444, -0.0016013707499951124, -0.041124675422906876, 0.024115480482578278, -0.030175134539604187, -0.04879765212535858, -0.04118500277400017, -0.023199332877993584, -0.0015789448516443372, -0.05974462255835533, 0.09786267578601837, -0.0012028695782646537, -0.03222127631306648, 0.01371813379228115, -0.051267463713884354, 0.03097078949213028, -0.00029238039860501885, -0.01280228327959776, 0.05024595558643341, 0.04542503505945206, -0.01515924371778965, 0.025314506143331528, 0.015459327958524227, -0.009454604238271713, 0.04893197864294052, -0.02968834899365902, 0.018507737666368484, 0.03016074188053608, -0.011787643656134605, 0.03426725044846535, 0.013672607019543648, -0.09145011007785797, -0.08258367329835892, -0.2126886397600174, -0.00308783445507288, -0.017770105972886086, -0.040336497128009796, 0.03166225552558899, -0.04044615477323532, 0.042114850133657455, -0.02356177754700184, 0.009235505014657974, 0.059682417660951614, 0.08622647821903229, -0.010379968211054802, -0.029204897582530975, 0.012501873075962067, -0.022741055116057396, 0.039569418877363205, -0.017519831657409668, 0.024035943672060966, -0.04318961873650551, -0.023436546325683594, -0.06477155536413193, 0.016368236392736435, 0.010616039857268333, -0.052973672747612, 0.05131319537758827, -0.05294080078601837, 0.23461264371871948, 0.08803842961788177, -0.015671558678150177, -0.011463264934718609, 0.02661527320742607, 0.04113397374749184, -0.03174246475100517, -0.07817859947681427, 0.056495390832424164, 0.035770487040281296, 0.007142545189708471, -0.024223150685429573, -0.008193607442080975, -0.018207447603344917, -0.013005957007408142, 0.04338805004954338, -0.01563885807991028, -0.0453493595123291, 0.0008113872027024627, -0.03647752106189728, -0.02137533575296402, 0.007010268978774548, -0.02934383600950241, 0.027189509943127632, 0.03338267654180527, 0.010377868078649044, 0.009659153409302235, -0.005786338821053505, 0.010796464048326015, -0.0387500561773777, -0.0671687200665474, 0.021992575377225876, -0.02021123468875885, 0.04183439910411835, -0.01980210468173027, -0.06541269272565842, -0.004058706574141979, -0.07836295664310455, 0.07000848650932312, 0.026568468660116196, -0.010251004248857498, -0.04325097054243088, 0.021227452903985977, -0.021218156442046165, -0.023904521018266678, 0.10218425840139389, 0.005135990213602781, -0.017437778413295746, 0.0738183930516243, 0.03397972136735916, 0.03748952969908714, 0.0029420906212180853, 0.02577158808708191, -0.049451880156993866, 0.03829948976635933, -0.023978326469659805, 0.023289592936635017, 0.02635009214282036, 0.020408397540450096, 0.02473253570497036, 0.03424143046140671, -0.05344091355800629, 0.058877307921648026, -0.053105659782886505, -0.021654726937413216, -0.0072240401059389114, -0.05864690989255905, 0.0029593196231871843, 0.013162598945200443, 0.007373427040874958, -0.3318018317222595, 0.06649863719940186, 0.045905210077762604, 0.01697738841176033, 0.011247399263083935, 0.01899093948304653, 0.04377378523349762, 0.020879734307527542, -0.06314224004745483, 0.002226317999884486, -0.002481822157278657, 0.021679287776350975, 0.029936620965600014, -0.012498975731432438, 0.008387036621570587, 0.04190122336149216, 0.03468235209584236, -0.042833782732486725, 0.05000312626361847, -0.05944757163524628, 0.021635115146636963, 0.012878944166004658, 0.242210254073143, -0.007152471225708723, -0.032086197286844254, -0.018137957900762558, -0.014444645494222641, 0.01482002530246973, 0.02344638854265213, 0.002516234992071986, 0.00975122395902872, 0.011346649378538132, 0.05697658285498619, -0.03623925894498825, 0.0381799191236496, 0.07670088857412338, -0.057818152010440826, 0.029631448909640312, -0.010112856514751911, 0.0016131964512169361, -0.01165181864053011, 0.02256995625793934, -0.05764652043581009, -0.028431933373212814, 0.06180701032280922, -0.01963830180466175, -0.004592408426105976, -0.03913246840238571, 0.022281037643551826, 0.006680737249553204, -0.05981873720884323, 0.0048486231826245785, -0.026228342205286026, -0.0029385092202574015, 0.02251214161515236, 0.027573678642511368, 0.00596230011433363, -0.01492766011506319, -0.02497190050780773, 0.0037556563038378954, 0.03467639908194542, -0.00970738846808672, 0.00024123390903696418, 0.02989904396235943, 0.041211627423763275 ]