My folders
and my gitignore file
but my assets folder "data" is not uploading to heroku.
this is my ls in heroku console.
Why it is not uploading my asset folder. Also i don't want to upload my assets so I used neglected every pdf or image files.
It's possible that your folder contains only files which are ignored by your .gitignore. Empty folders are not automatically uploaded to github or heroku unless they contain "something." Try adding a simple .txt file, commit that change, and see if it works.
Related
I want to upload a react app in github. But, I dont want to HOST IT. I only want to keep the codes there. But while uploading, I had problem with uploading the node_modules folder. I searched other repo, and even there node_modules folder wasn't present. Still their code could be used by running a command called npm install or something similar to that.
What are the steps to upload My ReactJS Code without uploading the node_modules. But in such a way, by which anyone can install all the node modules by npm install or something similar to that?
To tell git to exclude something in your project, you use a .gitignore file. In the .gitignore file, you can add patterns to files or folders and git will not track any of those files.
Here is a template for Node projects given by GitHub. It excludes the node_modules folder. Put it in your project root and remember to rename it to just .gitignore (note the period in front).
I have fresh .Net core web app and it's source code uploaded first time on production server with CICD of the same. It went successfully but when I run the web app, the UI and js files were missing. After much digging in, I found that bower_component folder is missing which includes necessary css and js files from wwwroot folder.
Can anybody tell me why it is not uploading bower_components to the wwwroot folder?
You need to modify your .csproj file to include bower_component folder.
You can read offical document first(Include files at publish time), then you can refer below posts.
Related posts(include files, not folder) can refer to:
1. Unable to find files located in my root project folder when hosted on Azure
2. .NET Core include folder in publish
3. How to copy a folder to output directory and keep its root folder? #2949
4. dotnet core publish: include/exclude dir in output
I have a folder outside of the Dist directory called uploads. This is where all files uploaded are stored. Namely image files.
I can not figure out how to access these files without them being in the Assets directory in the dist folder. Putting them in the dist folder is not an option here.
If I upload them directly into the dist folder it will work in prod, until I need to take the site down for maintenance, then the whole dist folder will be destroyed on rebuild, and subsequently all the uploads.
If I upload to the assets folder in the src, they won't be displayed because they are not in dist. I am extremely confused and not sure what to do.
The outline of the project is to have uploads ran through a Node.js back end, stored in a local directory called uploads, and then accessed from the dist folder.
I am currently starting out in node.js and I am a bit confused with the folder/file setups. Let´s say I have a main folder where all my different projects are located, and those are folders too. Now where do I need to keep my node-modules folder? Also how about the package.json file, do I need that inside each project folder?
use npm init first
it will make a package.json file.
Install the dependencies which be stored in Node_modules folder
Now make a folder named Public
with subfolders assets, css, js, index.html -- the FrontEnd part
When I try to upload my Node.js project on Elastic Beanstalk I obtain the following error:
Failed to find package.json. Node.js may have issues starting. Verify package.json is valid or place code in a file named server.js or app.js.
However, I have the package.json in the main directory.
A couple of people were zipping the parent folder incorrectly. You need to select all the contents of the folder and zip those.
https://forums.aws.amazon.com/message.jspa?messageID=477087
https://forums.aws.amazon.com/thread.jspa?threadID=130140&tstart=0
While uploading the .zip file (Nodejs application) we need to select all the files in the folder, then zip it as shown in below screenshot.
Then upload the Nodejs(zip file) project in AWS Elastic Beanstalck.
I had the same issue running a zip of node js boilerplate. It worked when I removed .git and .idea directories and n.gitignore file from the zip.
You need to zip the build directory, to do so inside that directory you can zip -r upload.zip . (do not forget the dot at the end for current directory).
So in that directory you need to have your index.js or server.js as EB looks for how to run the app in the directory only and will not look into folders src, dist etc.
This can be the packaging issue. You will need to go inside the project and compress altogether as provided in the screenshot:
If you use eb cli, make sure you have git committed all the changes.
If you do zip and upload, make sure you don't zip the parent folder but selecting all files and zip.
In my case i have found a wrong copy of the folder .elasticbeanstalk with inside another config.yml
example
root_project_folder
.elasticbeanstalk/
config.yml
public/
.elasticbeanstalk/
config.yml
and when I started the "eb deploy" command it failed because use the wrong public/ folder as a ROOT
removing the public/.elasticbeanstalk/ have resolved my issue
Ciao