GithubHelp home page GithubHelp logo

letoh's Introduction

How to set up

  1. Pull repository
  2. run sudo npm install
  3. run sudo npm install fs
  4. npm start (localhost:3000)

Images

run npm install --save express-fileupload

Put this in app.js

const fileUpload = require('express-fileupload');
app.use(fileUpload());

Setting up the database

  1. run sudo npm install --save mysql if you haven't already done so
  2. Paste this code in your app.js. Change YOURPASSWORDHERE to your password used to access your mysql.
/* use mysql in this app */
var mysql = require('mysql');
var dbConnectionPool = mysql.createPool({
  host: '127.0.0.1',
  user: 'root',
  password: 'YOURPASSWORDHERE',
  database: 'Letoh'
});
app.use(function(req, res, next) {
  req.pool = dbConnectionPool;
  next();
});
  1. Important: untrack app.js from git. This will prevent merge clashing since we have different passwords. Do this by using the command
git rm --cached app.js
  1. Optional: Test that everything works. Start the server and go to http://localhost:3000/dbtest.json. You should see the users in the database.

letoh's People

Contributors

1998justinlee avatar callmart avatar davidhin avatar

Stargazers

 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.