Compare commits

...

4 Commits

Author SHA1 Message Date
45155bbce0 2.0.40 2023-03-30 16:44:46 +02:00
35bcf717cb fix(core): update 2023-03-30 16:44:45 +02:00
4d3be1064d 2.0.39 2023-03-30 16:42:02 +02:00
8ee72f9380 fix(core): update 2023-03-30 16:42:02 +02:00
4 changed files with 7 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedserver",
"version": "2.0.38",
"version": "2.0.40",
"description": "easy serving of static files",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",

View File

@ -82,12 +82,11 @@ tap.test('should add typedrequest and typedsocket', async () => {
tap.test('should start the server allright', async () => {
await testServer.start(3000);
console.log('Yay Test Start successfull!');
});
// see if a demo request holds up
tap.test('should issue a request', async (tools) => {
const response = await smartrequest.postJson('http://localhost:3000/someroute', {
const response = await smartrequest.postJson('http://127.0.0.1:3000/someroute', {
headers: {
'X-Forwarded-Proto': 'https',
},
@ -99,20 +98,20 @@ tap.test('should issue a request', async (tools) => {
});
tap.test('should get a file from disk', async () => {
const response = await fetch('http://localhost:3000/someroute/testresponse.js');
const response = await fetch('http://127.0.0.1:3000/someroute/testresponse.js');
console.log(response.status);
console.log(response.headers);
});
tap.test('should answer a preflight request', async () => {
const response = await fetch('http://localhost:3000/some/randompath/', {
const response = await fetch('http://127.0.0.1:3000/some/randompath/', {
method: 'OPTIONS',
});
console.log(response.headers);
});
tap.test('should exposer a sitemap', async () => {
const response = await fetch('http://localhost:3000/sitemap');
const response = await fetch('http://127.0.0.1:3000/sitemap');
console.log(await response.text());
});

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.38',
version: '2.0.40',
description: 'easy serving of static files'
}

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiglobal/typedserver',
version: '2.0.38',
version: '2.0.40',
description: 'easy serving of static files'
}