Code Monkey home page Code Monkey logo

onething's Introduction

OneThing

Usage

Installation

This project has front- and back-end components. The installation of packages are managed separately.

Before starting the application:

$ npm i
$ cd client && npm i

Running

To run the front- and back-ends in parallel:

$ npm run dev

Then open a new terminal:

$ cd client && npm run start

In the future, I may tie these together into a single command or orchestrate with something like Lerna.

onething's People

onething's Issues

Notes from Brandon

https://github.com/stephencweiss/onething/blob/9987276f76b1fd767edea0ff43337d6fe6335541/server/server.js#L38

We'll want to start putting variables that might be re-usable, such as URL, in the environment (i.e. so you can access as process.env.URL or something to that effect.

Or better yet, if you can get the hostname out of the react-app framework (like here), then you don't need to create an environment variable.

https://github.com/stephencweiss/onething/blob/master/server/server.js#L22-L24

Cool stuff! Something as monumental as an endpoint deserves a comment before. It would be helpful to detail things like: Description, Method (POST, GET, etc), Authentication (if any), Parameters (if any)

Next steps to consider looking into:

  • Move the json array in the response to its own variable, like:
var response = [{id: 1, name: 'ab'}, {id: 2,name: 'def'}];
app.get('/api/users', (req, res) => {
  return res.status(200).json(response)
})
  • Or better yet, move the logic for building the response object into its own file. That way, we can separate the mechanism for creating endpoints from the purpose that the end http endpoint executes. It will also be easier to organize down the road, if you need to include large database queries in the response logic.

https://github.com/stephencweiss/onething/blob/master/client/src/App.tsx#L27
Not a must, but adding a unique id per <p> might be helpful for identifying/styling records in the front-end in the future.

Local mail development:
https://mailtrap.io/faq
https://blog.mailtrap.io/sending-emails-with-nodemailer/#Installation

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.