Code Monkey home page Code Monkey logo

operation-mothers-day's Introduction

Operation: MOTHERS-DAY

Our best-looking undercover operative has gone missing and we have to act fast to find her, confirm her identity, and extract her from danger! ๐Ÿ˜Ž


Development

npm run start โ€“ serve the React app with hot reload + start the Node server. There are also separate commands to run just one or the other (npm run front and npm run back)

npm run build โ€“ build the React app for production

npm run server โ€“ start the Node app with node instead of nodemon

npm run eject โ€“ if you're not happy with the default configuration from create-react-app, this command will give you finer-grained access to it

By default, the React app is served at localhost:3000 and the Node server at localhost:7777/api. This can be customized by updating the .env files (.env.development, .env.production, api.env).


Deployment

Copy api.env.example to api.env:

$ cp api.env.example api.env

Replace the example values with the correct information for your environment.

Install dependencies:

$ npm i

Build the React app:

$ npm run build

Start the Node app with any process server (such as pm2):

$ pm2 start npm --name omd-api -- run server

If you want to serve requests to both ends of the app over one domain, make sure you proxy API requests to the port where the Node server is running. In Apache, add this to your VirtualHost:

ProxyPass /api http://localhost:7777/api
ProxyPassReverse /api http://localhost:7777/api
ProxyPreserveHost On

VonageSDK for sending SMS from the browser

Create an account with Vonage in order to get the necessary API_KEY and API_SECRET, and your FROM number. You'll only be able to send test messages until you create a new "Brand", at which point you can send SMS messages to a single number (the one you signed up with). The number can be changed but requires a 2FA code to prove ownership.

During development, you can set the DISABLE_APIS flag in api.env to enable / disable calls to the Vonage API.

operation-mothers-day's People

Contributors

hellkat1911 avatar

Watchers

 avatar

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.