Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.
/ backend-example Public archive

Example for backend with a mysql database, simple front-end, and a Node server

Notifications You must be signed in to change notification settings

CMDA/backend-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backend-example

Example with a mysql database, simple front-end, and a Node server.

Install

Install the project:

git clone git@github.com:wooorm/backend-example.git
cd backend-example
npm install

You also need mysql, of course. I did the following on OS X with homebrew:

brew install mysql
brew services start mysql
mysqladmin -u root -p # prompts to create a new password

Store your password, user, and name in a .env file, like so:

DB_HOST=localhost
DB_USER=root
DB_NAME=backendexample
DB_PASSWORD=mypassword

Fill the database:

mysql -u root -e 'CREATE DATABASE IF NOT EXISTS backendexample' -p
node populate # crawls an API and stores stuff in the database.

Finally, do:

npm start # run server on localhost:2000.

About

Example for backend with a mysql database, simple front-end, and a Node server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published