How can I clone / create a copy of my local meteor app? - meteor

How can I create a copy of my entire local meteor application? I was expecting a command like "meteor clone myapp" but couldn't find any documentation and simply copying the folder doesn't work.

You could use git to clone the whole thing.
If you aren't familiar with git see this reference. http://gitref.org/creating/

In windows, you can copy and paste the entire project directory and go into .meteor/local directory and delete everything in that directory except the db directory. Then start the meteor server on the new project directory, with everything deleted in the .meteor/local directory, meteor will rebuild the project without altering the logic of your application.

Related

Unable to push Repo from "react-native-firebase-starter" template

I cloned this repo to start my own project
https://github.com/invertase/react-native-firebase-starter
I have made some modifications and got it setup for Firebase, however I cannot push or rename the Repository.
I ran npm run rename and renamed the directory. GitHub still seems to think I am trying to push the orginal repository as my own.
When I try to push I get:
Authentication failed. You may not have permission to access the repository or the repository may have been archived...
How can I keep this template/starter and push a copy of it as my own repository?
I have tried removing all of the inessential files from the Repo and pushing that way. I get the following error:
I expected to be able to use the starter as a starter to get a project up and running... Maybe I am missing something super obvious.
I don't see a .git folder within the root of the react-native-firebase-starter template, perhaps this is causing issues with pushing this template since git needs to know where to point to upstream.
Maybe you could try initializing the template to your personal git repository and seeing if this resolves your authentication issue:
Create a new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files.
Initialize the local directory containing the template as a Git repository:
git init
Add the files in your new local repository. This stages them for the first commit:
git add .
Commit the files that you've staged in your local repository:
git commit -m "Initial commit"
At the top of your GitHub repository ,created in step 1, copy the remote repository URL.
Add the URL for the remote repository where your local repository will be pushed:
git remote add origin <remote_repository_url>
Push the changes in your local repository to your upstream repository contained in GitHub:
git push -u origin master
You should now be able to push this starter template into your own GitHub repository and use it as your own project.
As for the npm run rename command: this is a custom npm run script created by the author of this starter template and it simply runs the rename.js file contained within the .bin directory of the template's root directory. All this command does is recursively rename the files contained within this template project to the new name specified by your input, so I don't think this is causing the issue. I suspect once your project has been initialized properly with git the authentication issue will disappear as it will now point upstream to your personal repository.
Hopefully that helps!

Sharing .netcore project between windows and linux Keeps adding files

I am working on a group project and we have decided to use netcore for the project. The project was originally created using VS.
When I pull the project and run it using VSCode, I have noticed two things:
I have to navigate to the src folder and run it from there.
Before pushing new changes to the master branch, .netcore on linux has made changes to obj folder and added .vscode folder.
how can I stop this from happening so we don't step over each others toes, and why does this happen?
Thanks.
You should not add the files under obj to source control. It contains artifacts that are regenerated on every build.
If you use git, here's a suggested list of files and folders to ignore:
[Oo]bj/
[Bb]in/
.vs/
*.xap
*.user
/TestResults
*.vspscc
*.vssscc
*.suo
*.cache
*.docstates
_ReSharper.*
*.csproj.user
*[Rr]e[Ss]harper.user
_ReSharper.*/
packages/*
artifacts/*
msbuild.log
PublishProfiles/
*.psess
*.vsp
*.pidb
*.userprefs
*DS_Store
*.ncrunchsolution
*.log
*.vspx
/.symbols
nuget.exe
build/
*net45.csproj
*k10.csproj
App_Data/
bower_components
node_modules
*.sln.ide
*.ng.ts
*.sln.ide
project.lock.json
.build/
.testpublish/
launchSettings.json

Change Meteor Up start.sh template

Due to install Graphicsmagick at Meteor Up Docker, I need to edit the start.sh (link this: Meteor Up Docker and Graphicsmagick).
I done that at the server and works, but every time I run mupx deploy, my /opt/<appName>/config/start.sh file change to original. I need to change the start.sh template, but I don't know how to do that, how can I change it?
You have to change the file from your local meteor-up template. not sure about mupx, it might be in your global .npm installation folder.
I'm using kadira meteor-up so mine is located at the git cloned folder.

sails.js v0.11.0 assets not being copied

I'm new to node.js, sails.js and grunt.js.
When I run "sails lift" it does not create the .tmp folder and copy the assets to that folder.
However, when I run "grunt" in the project folder, the .tmp folder does get created and the assets do get copied over.
Anyone have suggestions on how to fix so "sails lift" works without calling "grunt"?
Check if the sails process has the right privileges and you're not running short of space.
Also, try manually deleting the .tmp folder and lifting again. Sometimes there can be issues with automatic file removal if any of the files are in use.

Meteor + PhantomJS how to make it work

im trying to install PhantomJS in a MeteorApp.
I have done those step:
Add the npm package
meteor add meteorhacks:npm
Run meteor to let the npm package to pre-initialise
meteor
A file packages.json has been created at the root. Edit it to:
{
"phantomjs": "1.9.13"
}
A this point everything seem to work. But i try to test with this exemple that ive found here :
https://github.com/gadicc/meteor-phantomjs
But i dont understand where to put my phantomDriver.js
Why is phantomDriver.js is in assets/app/phantomDriver.js... but after, they say to create the file in ./private/phantomDriver.js...
Thank for clear explication :)
In development mode you create the file in /private/phantomDriver.js. When you build a meteor app it refactors everything into an application bundle which can be run.
After meteor builds your app it stores stuff from private into assets. For phantomjs to execute this file it needs to look in this directory. You don't have to create it. This is how meteor works internally.
If you look in your .meteor/local/build/programs/server directory the assets directory is there with anything you placed in private.
From the context of where your meteor code runs (the server directory above) the assets directory runs from this directory when your project is running.
Keep in mind when you deploy your app it loses its entire project structure and becomes something else. Gadi's phantomjs project is designed to work in production environments too.
TLDR; Don't worry about the assets directory, keep your file in /private/phantomDriver.js. Meteor should take care of the rest.

Resources