Pastvu com фотографии
Содержание:
Contributing
We welcome any keen developer in helping us build the better PastVu. You can install local version of the project using the following instructions.
Dependencies
-
It’s recommended to create a folder where you’ll be storing all the pastvu related data and code. For the sake of this readme we can call it pastvu_dev, so do . But, of course, you can structure it however you like.
-
Create folders for the data, database and logs: .
-
Clone the project (being inside the folder if you like):
-
Directly from this repository if you want to just try this project out without having a plan to commit any code or you want to commit and you are a maintainer with the admin permissions (you are probably not), do .
-
Otherwise, if you are not an admin and you do plan to contribute by committing a code, then fork the repository first (standard github flow) and then clone it from you repository name, like .
It will create project folder inside your folder.
-
-
Move to folder and install npm dependencies by doing .
By the end this section you should have folder with these folders inside: , , , , , .
Configuring
You can now open the project folder () in your favorite IDE.
-
Copy into . Default configuration is located in file, it’s just a JavaScript file, and its object is passed to the local.config.js as an argument. You can modify any of the props and return the final version of the config. Remember, don’t change unless you are altering the default project configuration for a purpose. is in .gitignore and you can change it locally as much as you want without affecting others.
-
Depending on the prop in your local.config.js, you should modify your hosts file to associate that domain with your localhost. There are different ways to modify hosts file on different OS that you can google, for example, on macos you do . And assuming you have the default setting , you need to update hosts file with
-
mail: { type: 'SMTP', secure: false, host: 'smtp.ethereal.email', port: 587, auth: { user: 'hello.world@ethereal.email', pass: 'ABCdsSDFs23edf', }, },
-
Download db sample into your folder and import it to your MongoDB
# Start MongoDB server: ./mongodb-3.2.22/bin/mongod --dbpath ./db --storageEngine wiredTiger # Unarchive the db sample tar -xzvf pastvu.tar.gz # Import pastvu db ./mongodb-3.2.22/bin/mongorestore --db pastvu dump/pastvu
Now you have one default user with password and 6.5K regions in you database
Starting
There are two databases, and , and four services to start: (main application), (responsible for uploading images), (responsible for downloading images) and (responsible for generating sitemap). It’s not necessary to start all of them locally, only is required, but if you want to work with images make sure to start corresponding services as well.
-
Start MongoDB server . You can inspect it using the default terminal client or any other third-party client with gui.
-
Start Redis server . You can inspect it using the default terminal client .
-
Being inside the project folder (), you can manually start any service directly with , and any parameter, like . Or you can use shorthand scripts from package.json and start the services in the following way:
Now, depending on the prop in your local.config.js you should be able to access your local copy of PastVu in your browser!