title: ExpressJS backed with mix of ejs and React frontend
body: <p>I currently have a NodeJS application with an Express backend and all the frontend implemented with EJS. An example route looks like this currently:</p>
  <pre><code>router.get(&quot;/:name&amp;:term&quot;, function(req, res) {
      Course.find({ courseName: req.params.name, courseTerm: req.params.term }).populate(&quot;students&quot;)
      .exec(function(err, foundCourse) {
          if (err) {
              console.log(err);
          } else {
              console.log(foundCourse)
              res.render(&quot;courses/show&quot;, { course: foundCourse });        
          }
      });
  });
  </code></pre>
  <p>I have a lot of the pages of the website already implemented following the example route above. So the structure looks something like:</p>
  <pre><code>localhost:3000
  -/courses
     -/show
     -/review
  -/professors
     -/show
     -/rating
  ...
  </code></pre>
  <p>But I recently took a React course and want to use React for new pages like <code>localhost:3000/groups</code></p>
  <p>Is there a way to use React for some pages and still have EJS pages that I currently have? or do I have to rewrite all the EJS pages to React components? I'm still very new to web dev so any advice would be highly appreciated.</p>
  <p>From my understanding, I would have to let the React app catch only certain requests/routes but I am not quite sure how to do that.</p>