Skip to content

Local deployment #160

Answered by oleeskild
Tomaubier asked this question in Q&A
Jan 12, 2023 · 8 comments · 17 replies
Discussion options

You must be logged in to vote

I don't know your skill level when it comes to node and docker, so excuse me if I'm either over or under explaining this. Let me know if you have any questios, or something isn't clear.

I threw something together you could use to run this locally:

  1. Clone your digital garden repo to your computer
  2. run npm install express --save to install express as a dependency.
  3. Create a new file in the root folder called app.js, and paste the following code:
const express = require('express')
const app = express()
const port = 8080; 

const searchHandler = require('./netlify/functions/search/search.js').handler;

app.get('/api/search', async (req, res) => {
  //Mock the netlify event
  let event = {query…

Replies: 8 comments 17 replies

Comment options

You must be logged in to vote
10 replies
@davidkopp
Comment options

@davidkopp
Comment options

@wchorski
Comment options

@davidkopp
Comment options

@janfromm
Comment options

Answer selected by Tomaubier
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@naquad
Comment options

@ninijay
Comment options

Comment options

You must be logged in to vote
1 reply
@janfromm
Comment options

Comment options

You must be logged in to vote
2 replies
@juanjesusov
Comment options

@pedroporo
Comment options

Comment options

You must be logged in to vote
1 reply
@mounta11n
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dangehub
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet