我是否应该将我的回购私有用于为企业建立网站?

时间:2022-10-19 22:28:37

I am building a website for a freelance gig (for a family member) and it is a website for a new business to display their showroom and current inventory of one-of-a-kind items. I do not believe there will be any sensitive data on the website. There will be a admin page for admins login and add items and lots of pictures.

我正在建立一个*职业者的网站(为一个家庭成员),它是一个新业务的网站,以显示他们的陈列室和当前的独一无二的项目库存。我不相信网站上会有任何敏感数据。将有管理员登录管理页面并添加项目和大量图片。

My first question is: Is it okay to use a public github repo? (I am trying to build up my portfolio) Or would it be better to use a private repo on bitbucket?

我的第一个问题是:是否可以使用公共github回购? (我正在努力建立我的投资组合)或者在bitbucket上使用私人仓库会更好吗?

My second question is: Is it ridiculous to build this app/website from scratch with the MEAN stack? I know it will take some time to get everything set up and I have some experience building MEAN stack apps. Is the MEAN stack a reasonable solution for this project?

我的第二个问题是:使用MEAN堆栈从头开始构建这个应用程序/网站是否荒谬?我知道需要一些时间才能完成所有设置,并且我有一些构建MEAN堆栈应用程序的经验。 MEAN堆栈是否是该项目的合理解决方案?

Thanks!

2 个解决方案

#1


0  

I program with the MEAN a lot and i find it very suitable to do just about anything. I build all my MEAN projects from scratch. Yes it will take longer but it is my personal preference. For this project i think MEAN is very good especially if you already have experience with it. You are going to want to do your research when storing images with Mongo. Mongo does not handle large amounts of data good and files and images eat up a lot but there are ways to store images properly. Research GridFS

我和MEAN一起编程很多,我发现它非常适合做任何事情。我从头开始构建所有MEAN项目。是的,它需要更长的时间,但这是我个人的偏好。对于这个项目,我认为MEAN非常好,特别是如果你已经有了它的经验。在使用Mongo存储图像时,您将要进行研究。 Mongo不能处理大量数据,文件和图像会消耗很多,但有一些方法可以正确存储图像。研究GridFS

If you are trying to build a portfolio then make the repo public. If there is sensitive information in your code such as token secrets, passwords, auth_tokens. Then you can use environment variables to store those. For example:

如果您正在尝试构建投资组合,请将回购公开。如果您的代码中存在敏感信息,例如令牌密码,密码,auth_tokens。然后,您可以使用环境变量来存储它们。例如:

if you have:

如果你有:

auth_token = 12345;

auth_token = 12345;

On your computer, you can set an environment variable for this and then use it like this

在您的计算机上,您可以为此设置环境变量,然后像这样使用它

auth_token = process.env.yourVariable //Not working code just an example

auth_token = process.env.yourVariable //不工作的代码只是一个例子

or before you publish your repo change the values

或在您发布回购之前更改值

auth_token = "your auth token"

auth_token =“您的身份验证令牌”

Some things to consider when publishing repo:

发布回购时需要考虑的一些事项:

  • Is this web site for someone else? maybe they don't want code in public
  • 这个网站是给别人的吗?也许他们不想公开代码

  • Is this website unique idea? maybe you do not want people to steal it
  • 这个网站是独特的想法吗?也许你不希望别人偷走它

Git offers private repos and if you are a student then they are free.

Git提供私人回购,如果您是学生,那么他们是免费的。

#2


0  

In response to your first question (Is it okay to use a public github repo?): If you are going to reference any sort of private keys or passwords in your repo, you should ensure that you don't expose them in your public repo. You should also speak with the family member to ensure they're okay with you sharing the source as part of your portfolio.

回答你的第一个问题(是否可以使用公共github仓库?):如果你要在你的仓库中引用任何类型的私钥或密码,你应该确保不要在公共仓库中公开它们。您还应该与家人交谈,以确保他们在您的投资组合*享资源时可以。

#1


0  

I program with the MEAN a lot and i find it very suitable to do just about anything. I build all my MEAN projects from scratch. Yes it will take longer but it is my personal preference. For this project i think MEAN is very good especially if you already have experience with it. You are going to want to do your research when storing images with Mongo. Mongo does not handle large amounts of data good and files and images eat up a lot but there are ways to store images properly. Research GridFS

我和MEAN一起编程很多,我发现它非常适合做任何事情。我从头开始构建所有MEAN项目。是的,它需要更长的时间,但这是我个人的偏好。对于这个项目,我认为MEAN非常好,特别是如果你已经有了它的经验。在使用Mongo存储图像时,您将要进行研究。 Mongo不能处理大量数据,文件和图像会消耗很多,但有一些方法可以正确存储图像。研究GridFS

If you are trying to build a portfolio then make the repo public. If there is sensitive information in your code such as token secrets, passwords, auth_tokens. Then you can use environment variables to store those. For example:

如果您正在尝试构建投资组合,请将回购公开。如果您的代码中存在敏感信息,例如令牌密码,密码,auth_tokens。然后,您可以使用环境变量来存储它们。例如:

if you have:

如果你有:

auth_token = 12345;

auth_token = 12345;

On your computer, you can set an environment variable for this and then use it like this

在您的计算机上,您可以为此设置环境变量,然后像这样使用它

auth_token = process.env.yourVariable //Not working code just an example

auth_token = process.env.yourVariable //不工作的代码只是一个例子

or before you publish your repo change the values

或在您发布回购之前更改值

auth_token = "your auth token"

auth_token =“您的身份验证令牌”

Some things to consider when publishing repo:

发布回购时需要考虑的一些事项:

  • Is this web site for someone else? maybe they don't want code in public
  • 这个网站是给别人的吗?也许他们不想公开代码

  • Is this website unique idea? maybe you do not want people to steal it
  • 这个网站是独特的想法吗?也许你不希望别人偷走它

Git offers private repos and if you are a student then they are free.

Git提供私人回购,如果您是学生,那么他们是免费的。

#2


0  

In response to your first question (Is it okay to use a public github repo?): If you are going to reference any sort of private keys or passwords in your repo, you should ensure that you don't expose them in your public repo. You should also speak with the family member to ensure they're okay with you sharing the source as part of your portfolio.

回答你的第一个问题(是否可以使用公共github仓库?):如果你要在你的仓库中引用任何类型的私钥或密码,你应该确保不要在公共仓库中公开它们。您还应该与家人交谈,以确保他们在您的投资组合*享资源时可以。