A simple demo app made to demonstrate basic client-server flow of data.
To get the project running locally, simply execute these scripts in order.
$ git clone https://github.com/roshnet/simple-hiring-task
$ cd simple-hiring-task/server
$ npm install
$ npm run start
In another shell, run the MongoDB daemon by -
$ mongod
If your local MongoDB instance has different configuration than default, change the devURI
in server/config.js
file.
The repository is two things -
- the front end (index.html)
- the server side code (the
server/
directory) - the database (hosted remotely)
The front end (which is a single page index.html), is hosted on Surge.sh (link here), and the Node.js server is deployed on Heroku (link here).
The database is a free MongoDB Atlas cluster, which is used by the Heroku server instance. When running locally, the app uses your local MongoDB installation by default.
- Clone this repository, and navigate to the
server/
directory. - Run
npm install
(from theserver
directory). - While that completes, install MongoDB. Run the daemon by
mongod
in another shell. - Once installed without errors, run
npm run start
(again, from the server/ directory) to launch the server. - Open index.html in the browser.
- Fill the form, and see the data appear in MongoDB, along with the uploaded file in
server/uploads
directory (use Compass to view the local and/or remote database).