#Previewing netlify email with astro in dev

14 messages · Page 1 of 1 (latest)

glass vigil
#

I have been following the netlify docs to use their email integration, I'm personally trying with Mailgun. https://docs.netlify.com/integrations/email-integration/
I've already linked the project with CLI and successfuly got to run netlify build and netlify dev, but I get this on my terminal:
⠧ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml

Here's my netlify.toml file:

[build]
  command = "npm run build"
  publish = "dist"

[[plugins]]
  package = "@netlify/plugin-emails"

[dev]
  command = "yarn start"
  port = 8888
  targetPort = 3000
  publish = "dist"
  autoLaunch = true
  framework = "astro"

btw, I have an emails/contact/index.html file from the root of the project, but if I try accessing localhost:3000/.netlify/functions/emails as per the docs, I get my 404 page.

patent umbraBOT
#
Still waiting for an answer?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.

glass vigil
#

up

raw kite
glass vigil
raw kite
#

Oh that basicSsl() plugin might be doing it 🤔 I could see that causing a similar issue if the Netlify CLI tool pings http://127.0.0.1:3000

Does it work if you remove that config? I'm wondering if it'd be safe to only enable those in production builds

glass vigil
#

I tried removing the https: true with no success, let me try again without the plugin.

#

Got the server to run now on port 8888, though all css now doesn't work.

Now it's asking for the NETLIFY_EMAILS_SECRET when I go to http://localhost:8888/.netlify/functions/emails which is odd, since it says it's auto generated in the docs

raw kite
#

yeah that's definitely a strange one 🤔 I haven't had a chance to try out their newer plugins yet, I'm not sure exactly how those env variables would tie between the CLI on :8888 and the Astro app on :3000

glass vigil
#

Oh, when using the netlify dev with my config, the astro app is also served at 8888

#

In the terminal I see ⠙ Setting up the Edge Functions environment. This may take a couple of minutes. but it's been more than 30 minutes now

glass vigil
raw kite
#

I'm really unfamiliar with exactly how netlify dev manages the dance between local function endpoints and the localhost:3000 app though

Hopefully someone here or in #netlify-archived might have an idea of where to go next with debugging