The-Movie-App | project shows how to use BottomNavigationView | Reactive Programming library
kandi X-RAY | The-Movie-App Summary
kandi X-RAY | The-Movie-App Summary
This project shows how to use BottomNavigationView, Android DataBinding library, Volley Library, The Movie Database API.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- On create view
- Set the list of movies
- Initialize the components
- Fetch movies from URL
- Fetch more items
- Adds a request to the request queue
- Gets the request queue
- Get the singleton instance
- Invoked when the bottom navigation view is nested
- Show bottom navigation
- Helper method to hide bottomNavigationView
- Initialize the dialog
- Creates a new instance of a MovieListFragment
- Load a fragment
- On create view holder
- Returns the count of movies
- Binds the viewer to a specific position
- Cancels pending requests for the specified tag
The-Movie-App Key Features
The-Movie-App Examples and Code Snippets
Community Discussions
Trending Discussions on The-Movie-App
QUESTION
I have been doing react apps for some time now and I want to deploy my latest project. The problem is, in this particular app, I use an API Key to make requests to The Movie Database API. After figuring out that I need to hide it in the backend with an .env file (something I have never done before), I made it work perfectly on my machine using an Express server I made. The two problems that I have start when I want to make this thing go live.
I separated my front end (https://github.com/cavini/the-movie-app) from my backend (https://github.com/cavini/the-movie-app-server). I hosted the frontend code on Netlify with zero issues, but I cannot make the hosted front end website make the GET and POST requests to the backend which is on Heroku.
I have never used heroku before and I'm not sure I fully understand how it works.
Here is the message I get when I try to see what my Heroku app looks like. Heroku deploy error? I went looking for answers on the logs but I do not understand what it says. Heres what that looks like: Heroku log, Heroku log 2 My questions are, do I need a static folder to host an app on heroku? If so, how do I do that? Because on the front end, react already has a build command to do so. Also, do I need the front end files too?
That's the first part of my problem. The second part is what I think is related to CORS. When I try to make the requests from my local files to the local back end code, it works perfectly, but when I try the same to the back end hosted on Heroku, I get this message on my Chrome console.Access-Control-Allow-Origin header error.
Heres what those look like on the Network tab: Request details, Request details 2
I have absolutely NO IDEA what any of this means and/or how to fix it. Can anyone please shed a light on this?
...ANSWER
Answered 2020-Nov-14 at 23:45Instead of trying to host the front end on netlify and the backend on heroku, you could host both front and backend on heroku from 1 github repository, which would also resolve the issue your having with Cors.
To host both front and backend on Heroku you'll need to put both folders into 1 directory, You'll also need to add something like this to your main express file which fetches the files from your front end files and displays it
(install path)
npm i path
,
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install The-Movie-App
You can use The-Movie-App like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the The-Movie-App component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page