I want to make some notes

Hi, guys, long time to not update my blog in 博客园,Now, I'm studying in Denmark, and worked part-time in a start-up. Everything is fine now. For everyday I touch new things in my work and study, I want record them in my blogs, because they are so easy to be forgotten. Meanwhile, I think it is very hard to insist if I cost several hours to do this thing, I don't want to give up after several days:) So, I decide just to take about half a hour a day to do this meaningful thing. It's cooool.

Ok, I will start and most piece of words would be in English in order to help myself practice my English.

deployment, CI/CD

Many start-ups put their code repositories in github or gitlab, and when them push a new version to gitlab, they need a quick and robust tool to deploy the code to production environment (like amazon cloud). So this whole process is called Continuous integration and Continuous deployment. Jenkins is a good tool to do this job and have both windows and linux version.

use jest to mock a file object or file-upload process

In my company, I need using jest to test the server (using apollo server and graphql), but it's really hard to mock the file stuff. I search in goole, tried a lot of solution, and still can't find one that works.The thing is that the server side doesn't consider it is a file.. So I ask my question in StackOverflow https://stackoverflow.com/questions/57506231/how-to-mock-file-upload-or-file-object-in-jest.

user registration and send email

When user want register, our system should send user's email address an email which contains a link for user to activate his account in our system. And we decide to put the a encoded string which contains the information of his email in the link. We do like this, because we don't want to create a user in our database before the user activates his account.

dataSource in apollo-server

the file in datasource folder should only communicate with DB, and in particular, components.js should only communicate the collection Components in MongoDb. So we should keep the other logic in resolver or in some services.

debug in Jest

when use Jest to test , debug is an annoying thing. The message in most situation doesn't show the real problem. When it shows a 400 error from server, it means that there is some wrong in your graphql structure.

apollo server engine

apollo server engine is a good online tool that help the developer statistics the visiting data and errors. With this tool, developer can easily know the running status of the website.

Altair

Altair is a good tool send request with file to apollo-server.

转载于:https://www.cnblogs.com/Andres/p/11360268.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值