title: show alert on response.render, in EJS template, if statement not working in EJS
body: <p>I have a signup port request and when that is complete it renders an EJS template with a verbal signupRequest: 'success'.</p>
  
  <p>But when I go to localhost:8888/ then it gives me this error
  <br>
  <br>ERROR:</p>
  
  <pre><code>    ReferenceError: /Users/oliver_christensen/Documents/codeFiles/nodejs-app-1/views/index.ejs:36
      34| &lt;/style&gt;
      35| &lt;body&gt;
   &gt;&gt; 36|     &lt;% if (signupRequest) { %&gt; 
      37|        &lt;script&gt;alert('You have been signed up successfully!');&lt;/script&gt; 
      38|     &lt;% } %&gt;
      39|     
  
  signupRequest is not defined
  </code></pre>
  
  <p>When I have been on the signup.html and send the post request. Then it works and index.ejs rendres.</p>
  
  <p>It just when you go to the localhost:8888/ without the post signup request, then it gives me the error...</p>
  
  <hr>
  
  <p>am I doing something wrong or, thanks for the help :) </p>
  
  <hr>
  
  <p>My code:</p>
  
  <pre><code>server.set('view engine', 'ejs');
  
  server.use(bodyParser.urlencoded({
      extended: true
  }));
  
  server.get('/', (req, res) =&gt; {
      res.render('index');
  });
  
  server.post('/signup', (req, res) =&gt; {
      // at the end of signup requset function
      res.render('index', {signupRequest: 'success'});
  }
  </code></pre>