Giter Site home page Giter Site logo

express-example's Introduction

express-example

code style styled with prettier made with lass license

This repository is just for example purposes.

Table of Contents

Example

This repository is just for example purposes. If you want to run this example locally, then follow these steps:

  1. Clone the repository locally and install dependencies:

    git clone https://github.com/breejs/express-example.git
    cd express-example
    npm install
  2. Start the app.js and bree.js processes in separate terminal windows at the same time:

    node app.js
    node bree.js
  3. Send example requests to the server (this will automatically open a browser tab for you with the rendered emails when they're sent):

    curl -X POST http://localhost:8080/send-email -d "[email protected]" 
    curl -X POST http://localhost:8080/book-ticket -d "[email protected]" -d "start_time=7/14/20 4:00 PM"
  4. You can modify the payload -d parameter values in the previous example requests if you wish to test different "movie start times" or email addresses. See the code in app.js and bree.js for more insight.

Contributors

Name Website
Nick Baugh http://niftylettuce.com/

License

MIT © Nick Baugh

express-example's People

Contributors

niftylettuce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

express-example's Issues

How can I run properly the example?

Hi, great library!

Just a question, how I can run the xample, I mean I need run separately node index.js and node bree.js ? because I tried run just index.js and after that do a POST request to http://localhost:8080/book-ticket giving it a body like this:

{
    "email": "[email protected]",
    "start_time": "08/09/2020 13:30"
}

however it don't scheduled the email, it sent the email like http://localhost:8080/send-email

Meybe i´m doing a mistake, any way to run the example properly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.