Skip to content

VernonHawk/Biblio

Repository files navigation

Biblio

A bibliography management service

Build Status

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need Node.js (which comes together with npm), MongoDB and git.

Check if everything is OK by running npm -v, node -v and git --version in the CLI, it should look simmilar to this:

> npm -v
5.8.0
> node -v
v9.11.1
> git --version
git version 2.10.1.windows.1

Installing

After you have installed Node.js and MongoDB, enter the CLI at the projects root directory. Then install the node modules via npm install or npm i.

Development and build

After installing the packages, you could run these commands:

  • npm run mongod OR npm run md to launch a MongoDB server
  • npm run dev-server OR npm run dev-s to launch a dev server (don't forget to run mongod first!)
  • npm run dev-client OR npm run dev-c to launch a webpack-dev-server
  • npm run build to create a production build of a client
  • npm run server to launch a production server.

Examples:

> npm run mongod

biblio@0.1.0 mongod Disk:\path\to\the\project\Biblio
mongod --auth

2018-04-30T12:45:49.825-0700 I CONTROL  [initandlisten] MongoDB starting : pid=12992 port=27017 dbpath=C:\data\db\ 64-bit host=YOUR_HOST
> npm run dev-server

biblio@version server Disk:\path\to\the\project\Biblio
set NODE_ENV=development&& nodemon src/back-end/startServer.js

[nodemon] 1.17.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node src/back-end/startServer.js`
App listening on port 3000!
Connected to MongoDB
> npm run dev-client

biblio@version dev-client Disk:\path\to\the\project\Biblio
node scripts/start.js
Starting the development server...
Compiled successfully!

You can now view biblio in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://SomeIP:3000/

Note that the development build is not optimized.
To create a production build, use npm run build.
> npm run build

biblio@version build Disk:\path\to\the\project\Biblio
node scripts/build.js

Creating an optimized production build...
Compiled successfully.
> npm run server

> biblio@0.1.0 server Disk:\path\to\the\project\Biblio
> set NODE_ENV=production&& node src/back-end/startServer.js

App listening on port 3000!
Connected to MongoDB

Running the tests

To run the tests open CLI and run npm run test. It will run Jest tests.

Built With

Versioning

We use Git for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache License - see the LICENSE and NOTICE files for details.