Ani T • over 4 years ago
Netlify Deployment Help + Project Deletion Request
*Hackathon manager, if you see this, please skip ahead to #Request.
✄┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
Netlify Question:
Technically, I'm asking in the 'wrong' hackathon discussion, but it's the most active & I know Netlify is one of the sponsors here so... it's at least partially relevant... if you're familiar with Netlify, then the answer should be obvious for you!
I'm trying to deploy a React+Node.js app. After several unsuccessful attempts, I finally figured out how to redirect all the routes and properly configure build. The app is now live at this url: https://goofy-ritchie-43409c.netlify.app/ As you can see, *only* the React app was deployed. How do I get Netlify to recognize the server too? According to the responder on the following post - https://stackoverflow.com/questions/51902639/react-node-deployment-on-netlify - this is apparently not even possible??
I don't wanna switch to Heroku if I don't have to, mainly cause I've forgotten my credentials & I'm too lazy to start over with another account. But also, I'd rather just stick with Netlify if I can. For reference, here's the repo I want to deploy: https://rebrand.ly/hctl75p Root dir of my project has netlify.toml configured for build & redirects - do I need to add another block? Or is it really lost cause? :(
✄┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
Request
I unintentionally submitted a project instead of saving a private draft (maybe you were notified since I got an email about it). Could you please delete my entry? I would if I could, but I don't have the ability to delete my project or withdraw my submission from my account (not that I know of). Also, I completed some side quests, but I don't have a project to submit to this hackathon. I assume this disqualifies me from everything, so here's a heads up to let you know so you can remove my entries to the weekly challenges before judging begins (my email address is the same).
Thanks!
Comments are closed.

1 comment
Dan Zeitman Manager • over 4 years ago
Regarding managing your submissions: Please review the DevPost Faq's or contact them directly. https://help.devpost.com/hc/en-us/categories/360001298552-Hackathon-Participants
Regarding Netlify, We do have an example that deploy's a Netlify Function and web page;
The repo is here:
https://github.com/dolbyio-samples/communications-api-token-server-netlify
Our example show you how to create a token service function and deploy that.
That project's Netlify toml configuration:
https://github.com/dolbyio-samples/communications-api-token-server-netlify/blob/main/netlify.toml
In our example the serverless function is in a folder called functions and the web page is in the www folder.
The netlify.toml configures the "build" settings:
[build]
publish = "www"
command = "echo No build command yet!"
functions = "functions"
---
Here we set the www folder as the web root. and functions to point to the functions folder where the functions are executed.
The rest of the code sets the redirects for the /api/ and also preconfigured the api key and secrets.
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/:splat"
status = 200
[template.environment]
CONSUMER_KEY = "Get your Consumer Key from https://dolby.io/"
CONSUMER_SECRET = "Get your Consumer Secret from https://dolby.io/"
**************
You could review Netlify's documentation for deploying a express app (your server) and use the build command:
Replacing:
command = "echo No build command yet!"
with
command = "npm run start".
Replace start with your run script.
Again the Netlify docs are pretty swell for the details of how to do this. You can also DM Phil Hawksworth @philhawksworth on Twitter. He's available for such questions.